From 6d853c43d9dd315eb42211150b7a4a43bae4cb62 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 21 Oct 2015 16:13:51 -0400 Subject: pimd: Limit pim hello log messages pimd was outputting allot of data surrounding pim hello packets. In addition the debugging was inconsistent and not all turned on via 'debug pim packet hello'. Signed-off-by: Donald Sharp --- pimd/pim_pim.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'pimd/pim_pim.c') diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index 66fc59be..a04a0afc 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -521,7 +521,7 @@ static int hello_send(struct interface *ifp, pim_ifp = ifp->info; - if (PIM_DEBUG_PIM_PACKETS || PIM_DEBUG_PIM_HELLO) { + if (PIM_DEBUG_PIM_HELLO) { char dst_str[100]; pim_inet4_dump("", qpim_all_pim_routers_addr, dst_str, sizeof(dst_str)); zlog_debug("%s: to %s on %s: holdt=%u prop_d=%u overr_i=%u dis_join_supp=%d dr_prio=%u gen_id=%08x addrs=%d", @@ -561,8 +561,10 @@ static int hello_send(struct interface *ifp, pim_msg, pim_msg_size, ifp->name)) { - zlog_warn("%s: could not send PIM message on interface %s", - __PRETTY_FUNCTION__, ifp->name); + if (PIM_DEBUG_PIM_HELLO) { + zlog_debug("%s: could not send PIM message on interface %s", + __PRETTY_FUNCTION__, ifp->name); + } return -2; } @@ -581,8 +583,10 @@ static int pim_hello_send(struct interface *ifp, if (hello_send(ifp, holdtime)) { ++pim_ifp->pim_ifstat_hello_sendfail; - zlog_warn("Could not send PIM hello on interface %s", - ifp->name); + if (PIM_DEBUG_PIM_HELLO) { + zlog_warn("Could not send PIM hello on interface %s", + ifp->name); + } return -1; } @@ -599,7 +603,7 @@ static void hello_resched(struct interface *ifp) pim_ifp = ifp->info; zassert(pim_ifp); - if (PIM_DEBUG_PIM_TRACE) { + if (PIM_DEBUG_PIM_HELLO) { zlog_debug("Rescheduling %d sec hello on interface %s", pim_ifp->pim_hello_period, ifp->name); } @@ -699,7 +703,7 @@ void pim_hello_restart_triggered(struct interface *ifp) random_msec = random() % (triggered_hello_delay_msec + 1); - if (PIM_DEBUG_PIM_EVENTS) { + if (PIM_DEBUG_PIM_HELLO) { zlog_debug("Scheduling %d msec triggered hello on interface %s", random_msec, ifp->name); } -- cgit v1.2.3