From: Donald Sharp Date: Tue, 6 Jun 2017 14:17:45 +0000 (-0400) Subject: pimd: debug guard error message X-Git-Tag: frr-4.0-dev~468^2~61 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=5667319bcfc443609b3b394bf01cb75deb72efe9;p=mirror%2Ffrr.git pimd: debug guard error message Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 5cfa1357a0..3fe2f4d92a 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -530,8 +530,14 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) sg.grp.s_addr = stream_get_ipv4(s); if (sg.src.s_addr != c_oil->oil.mfcc_origin.s_addr || sg.grp.s_addr != c_oil->oil.mfcc_mcastgrp.s_addr) { - zlog_err("%s: Received wrong %s information", - __PRETTY_FUNCTION__, pim_str_sg_dump(&sg)); + if (PIM_DEBUG_ZEBRA) { + struct prefix_sg more; + + more.src = c_oil->oil.mfcc_origin; + more.grp = c_oil->oil.mfcc_mcastgrp; + zlog_err("%s: Received wrong %s information requested", + __PRETTY_FUNCTION__, pim_str_sg_dump(&more)); + } zclient_lookup_failed(zlookup); return -3; }