From 209a56799b9246896b889b8bfaf557a345912182 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 31 Jul 2017 17:29:13 -0400 Subject: [PATCH] pimd: Cleanup nht debugs Signed-off-by: Donald Sharp --- pimd/pim_nht.c | 14 ++++++++------ pimd/pim_zlookup.c | 5 +++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index e91d251060..f7fa9993ad 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -850,12 +850,14 @@ int pim_ecmp_nexthop_lookup(struct pim_instance *pim, num_ifindex = zclient_lookup_nexthop(pim, nexthop_tab, MULTIPATH_NUM, addr, PIM_NEXTHOP_LOOKUP_MAX); if (num_ifindex < 1) { - char addr_str[INET_ADDRSTRLEN]; - pim_inet4_dump("", addr, addr_str, sizeof(addr_str)); - zlog_warn( - "%s %s: could not find nexthop ifindex for address %s(%s)", - __FILE__, __PRETTY_FUNCTION__, addr_str, - pim->vrf->name); + if (PIM_DEBUG_PIM_NHT) { + char addr_str[INET_ADDRSTRLEN]; + pim_inet4_dump("", addr, addr_str, sizeof(addr_str)); + zlog_warn( + "%s: could not find nexthop ifindex for address %s(%s)", + __PRETTY_FUNCTION__, addr_str, + pim->vrf->name); + } return 0; } diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 4b735e6cb1..df8ad4e428 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -192,8 +192,9 @@ static int zclient_read_nexthop(struct pim_instance *pim, nexthop_num = stream_getc(s); if (nexthop_num < 1) { - zlog_err("%s: socket %d bad nexthop_num=%d", __func__, - zlookup->sock, nexthop_num); + if (PIM_DEBUG_PIM_NHT_DETAIL) + zlog_debug("%s: socket %d bad nexthop_num=%d", __func__, + zlookup->sock, nexthop_num); return -6; } -- 2.39.5