diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-10-21 16:13:51 -0400 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-08 14:11:18 -0500 |
commit | 6d853c43d9dd315eb42211150b7a4a43bae4cb62 (patch) | |
tree | cc5f6ab4037c4221b735a3ab483a8548b2f0ab88 /pimd/pim_pim.c | |
parent | bf99b420a57b7c5bf44c8ab528d0a2e416b66d81 (diff) | |
download | quagga-6d853c43d9dd315eb42211150b7a4a43bae4cb62.tar.bz2 quagga-6d853c43d9dd315eb42211150b7a4a43bae4cb62.tar.xz |
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_pim.c')
-rw-r--r-- | pimd/pim_pim.c | 18 |
1 files changed, 11 insertions, 7 deletions
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("<dst?>", 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); } |