diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-03 21:29:05 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:13 +0100 |
commit | fad009d2887f22c413320b6cf209a2689afc7ea0 (patch) | |
tree | 7ba1b98d9aa04393cbe7b25c03b6133ebc5e6072 /pimd/pim_msg.c | |
parent | lib: Turn off automatic debugging of Wheel code. (diff) | |
download | frr-fad009d2887f22c413320b6cf209a2689afc7ea0.tar.xz frr-fad009d2887f22c413320b6cf209a2689afc7ea0.zip |
pimd: Protect debug messages.
Protect some debug messages from being displayed always.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_msg.c')
-rw-r--r-- | pimd/pim_msg.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c index 1ae039e1c..f58aec858 100644 --- a/pimd/pim_msg.c +++ b/pimd/pim_msg.c @@ -220,32 +220,38 @@ pim_msg_join_prune_encode (uint8_t *buf, int buf_size, int is_join, { if (!pim_rpf_is_same(&up->rpf, &child->rpf)) { - zlog_debug ("%s: SPT Bit and RPF'(%s) != RPF'(S,G): Add Prune (%s,rpt) to compound message", - __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); + if (PIM_DEBUG_PIM_PACKETS) + zlog_debug ("%s: SPT Bit and RPF'(%s) != RPF'(S,G): Add Prune (%s,rpt) to compound message", + __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); } else - zlog_debug ("%s: SPT Bit and RPF'(%s) == RPF'(S,G): Not adding Prune for (%s,rpt)", - __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); + if (PIM_DEBUG_PIM_PACKETS) + zlog_debug ("%s: SPT Bit and RPF'(%s) == RPF'(S,G): Not adding Prune for (%s,rpt)", + __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); } else if (pim_upstream_is_sg_rpt (child)) { if (pim_upstream_empty_inherited_olist (child)) { - zlog_debug ("%s: inherited_olist(%s,rpt) is NULL, Add Prune to compound message", - __PRETTY_FUNCTION__, pim_str_sg_dump (&child->sg)); + if (PIM_DEBUG_PIM_PACKETS) + zlog_debug ("%s: inherited_olist(%s,rpt) is NULL, Add Prune to compound message", + __PRETTY_FUNCTION__, pim_str_sg_dump (&child->sg)); } else if (!pim_rpf_is_same (&up->rpf, &child->rpf)) { - zlog_debug ("%s: RPF'(%s) != RPF'(%s,rpt), Add Prune to compound message", - __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); + if (PIM_DEBUG_PIM_PACKETS) + zlog_debug ("%s: RPF'(%s) != RPF'(%s,rpt), Add Prune to compound message", + __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); } else - zlog_debug ("%s: RPF'(%s) == RPF'(%s,rpt), Do not add Prune to compound message", - __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); + if (PIM_DEBUG_PIM_PACKETS) + zlog_debug ("%s: RPF'(%s) == RPF'(%s,rpt), Do not add Prune to compound message", + __PRETTY_FUNCTION__, star_g, pim_str_sg_dump (&child->sg)); } else - zlog_debug ("%s: SPT bit is not set for (%s)", - __PRETTY_FUNCTION__, pim_str_sg_dump (&child->sg)); + if (PIM_DEBUG_PIM_PACKETS) + zlog_debug ("%s: SPT bit is not set for (%s)", + __PRETTY_FUNCTION__, pim_str_sg_dump (&child->sg)); } } |