From: Donald Sharp Date: Sat, 23 Jul 2016 23:18:19 +0000 (-0400) Subject: pimd: Fix Join/Prune logging X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~345 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4950938e0cc100bb74d3f261d9c57e2488ac1f31;p=matthieu%2Ffrr.git pimd: Fix Join/Prune logging For some reason Join/Prune debugs were being turned on by trace not by the 'debug pim packets join' command. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_join.c b/pimd/pim_join.c index c496b988ee..5a2ff744e5 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -37,8 +37,9 @@ #include "pim_rpf.h" #include "pim_rp.h" -static void on_trace(const char *label, - struct interface *ifp, struct in_addr src) +static void +on_trace (const char *label, + struct interface *ifp, struct in_addr src) { if (PIM_DEBUG_PIM_TRACE) { char src_str[100]; @@ -183,7 +184,7 @@ int pim_joinprune_recv(struct interface *ifp, Check upstream address family */ if (msg_upstream_addr.family != AF_INET) { - if (PIM_DEBUG_PIM_TRACE) { + if (PIM_DEBUG_PIM_J_P) { char src_str[100]; pim_inet4_dump("", src_addr, src_str, sizeof(src_str)); zlog_warn("%s: ignoring join/prune directed to unexpected addr family=%d from %s on %s", @@ -210,16 +211,16 @@ int pim_joinprune_recv(struct interface *ifp, ++buf; ++buf; - if (PIM_DEBUG_PIM_TRACE) { + if (PIM_DEBUG_PIM_J_P) { char src_str[100]; char upstream_str[100]; pim_inet4_dump("", src_addr, src_str, sizeof(src_str)); pim_inet4_dump("", msg_upstream_addr.u.prefix4, upstream_str, sizeof(upstream_str)); - zlog_warn("%s: join/prune upstream=%s groups=%d holdtime=%d from %s on %s", - __PRETTY_FUNCTION__, - upstream_str, msg_num_groups, msg_holdtime, - src_str, ifp->name); + zlog_debug ("%s: join/prune upstream=%s groups=%d holdtime=%d from %s on %s", + __PRETTY_FUNCTION__, + upstream_str, msg_num_groups, msg_holdtime, + src_str, ifp->name); } /* Scan groups */ @@ -253,7 +254,7 @@ int pim_joinprune_recv(struct interface *ifp, msg_num_pruned_sources = ntohs(*(const uint16_t *) buf); buf += 2; - if (PIM_DEBUG_PIM_TRACE) { + if (PIM_DEBUG_PIM_J_P) { char src_str[100]; char upstream_str[100]; char group_str[100]; @@ -322,6 +323,8 @@ int pim_joinprune_send(struct interface *ifp, int pim_msg_size; int remain; + on_trace (__PRETTY_FUNCTION__, ifp, upstream_addr); + zassert(ifp); pim_ifp = ifp->info; @@ -333,7 +336,7 @@ int pim_joinprune_send(struct interface *ifp, return -1; } - if (PIM_DEBUG_PIM_TRACE) { + if (PIM_DEBUG_PIM_J_P) { char dst_str[100]; pim_inet4_dump("", upstream_addr, dst_str, sizeof(dst_str)); zlog_debug("%s: sending %s(S,G)=%s to upstream=%s on interface %s", @@ -343,7 +346,7 @@ int pim_joinprune_send(struct interface *ifp, } if (PIM_INADDR_IS_ANY(upstream_addr)) { - if (PIM_DEBUG_PIM_TRACE) { + if (PIM_DEBUG_PIM_J_P) { char dst_str[100]; pim_inet4_dump("", upstream_addr, dst_str, sizeof(dst_str)); zlog_debug("%s: %s(S,G)=%s: upstream=%s is myself on interface %s",