]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: brace zebra pbr traces
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 21 May 2018 10:02:52 +0000 (12:02 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 31 May 2018 15:44:40 +0000 (17:44 +0200)
By default, some debug traces were displayed. Those pbr traces are
hidden with 'debug bgp zebra' command.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_zebra.c

index 59a02859fa1daeb83dc16a20cbebfa9dbc8bf2be..9f9ee028368a3c01539355d4b904c0777ab17c47 100644 (file)
@@ -2523,8 +2523,10 @@ void bgp_send_pbr_rule_action(struct bgp_pbr_action *pbra, bool install)
 
        if (pbra->install_in_progress)
                return;
-       zlog_debug("%s: table %d fwmark %d %d", __PRETTY_FUNCTION__,
-                  pbra->table_id, pbra->fwmark, install);
+       if (BGP_DEBUG(zebra, ZEBRA))
+               zlog_debug("%s: table %d fwmark %d %d",
+                          __PRETTY_FUNCTION__,
+                          pbra->table_id, pbra->fwmark, install);
        s = zclient->obuf;
        stream_reset(s);
 
@@ -2546,8 +2548,10 @@ void bgp_send_pbr_ipset_match(struct bgp_pbr_match *pbrim, bool install)
 
        if (pbrim->install_in_progress)
                return;
-       zlog_debug("%s: name %s type %d %d", __PRETTY_FUNCTION__,
-                  pbrim->ipset_name, pbrim->type, install);
+       if (BGP_DEBUG(zebra, ZEBRA))
+               zlog_debug("%s: name %s type %d %d",
+                          __PRETTY_FUNCTION__,
+                          pbrim->ipset_name, pbrim->type, install);
        s = zclient->obuf;
        stream_reset(s);
 
@@ -2572,9 +2576,10 @@ void bgp_send_pbr_ipset_entry_match(struct bgp_pbr_match_entry *pbrime,
 
        if (pbrime->install_in_progress)
                return;
-       zlog_debug("%s: name %s %d %d", __PRETTY_FUNCTION__,
-                  pbrime->backpointer->ipset_name,
-                  pbrime->unique, install);
+       if (BGP_DEBUG(zebra, ZEBRA))
+               zlog_debug("%s: name %s %d %d", __PRETTY_FUNCTION__,
+                          pbrime->backpointer->ipset_name,
+                          pbrime->unique, install);
        s = zclient->obuf;
        stream_reset(s);
 
@@ -2638,8 +2643,10 @@ void bgp_send_pbr_iptable(struct bgp_pbr_action *pba,
 
        if (pbm->install_iptable_in_progress)
                return;
-       zlog_debug("%s: name %s type %d mark %d %d", __PRETTY_FUNCTION__,
-                  pbm->ipset_name, pbm->type, pba->fwmark, install);
+       if (BGP_DEBUG(zebra, ZEBRA))
+               zlog_debug("%s: name %s type %d mark %d %d",
+                          __PRETTY_FUNCTION__, pbm->ipset_name,
+                          pbm->type, pba->fwmark, install);
        s = zclient->obuf;
        stream_reset(s);