diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-10-21 22:13:51 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-05-26 02:38:33 +0200 |
commit | aea6cb942f4b3cfe92d6e6ec377d588269bed25a (patch) | |
tree | 2ff457f7a0ea599753e7989bfd3a606427712ae7 /pimd/pim_pim.c | |
parent | pimd: Fix size_t zlog_err format string warning (diff) | |
download | frr-aea6cb942f4b3cfe92d6e6ec377d588269bed25a.tar.xz frr-aea6cb942f4b3cfe92d6e6ec377d588269bed25a.zip |
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 66fc59be5..a04a0afc8 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); } |