From 56eb405ae4e84d095240f51ea7d93528b5c3a619 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 30 Apr 2012 13:01:43 -0700 Subject: [PATCH] cfm: Avoid constructing log message that will be dropped by rate-limiting. Signed-off-by: Ben Pfaff --- lib/cfm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cfm.c b/lib/cfm.c index 66bca75c6..38de68f79 100644 --- a/lib/cfm.c +++ b/lib/cfm.c @@ -394,12 +394,12 @@ cfm_run(struct cfm *cfm) cfm->fault |= CFM_FAULT_RECV; } - if (old_cfm_fault != cfm->fault) { + if (old_cfm_fault != cfm->fault && !VLOG_DROP_INFO(&rl)) { struct ds ds = DS_EMPTY_INITIALIZER; ds_put_cfm_fault(&ds, old_cfm_fault, cfm->fault); - VLOG_INFO_RL(&rl, "%s: CFM fault status changed:%s", cfm->name, - ds_cstr_ro(&ds)); + VLOG_INFO("%s: CFM fault status changed:%s", cfm->name, + ds_cstr_ro(&ds)); ds_destroy(&ds); } -- 2.43.0