From a770ef906378d2beb027dc48fa2c1062093e9ef8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 28 Nov 2016 12:18:43 -0500 Subject: [PATCH] pimd: Remove redundant logging When receiving a JOIN/PRUNE message if we have trace turned on we output this: 2016/11/28 17:11:46.368827 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103 2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623 2016/11/28 17:11:46.369003 PIM: pim_joinprune_recv: from 169.254.0.6 on swp31s1 2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1 2016/11/28 17:11:46.369099 PIM: nonlocal_upstream: recv prune (S,G)=(20.0.11.253,229.1.2.3) to local upstream=169.254.0.5 on swp31s1 Clean up the messaging to this: 2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623 2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1 Ticket: CM-13752 Signed-off-by: Donald Sharp Reviewed-by: Don Slice --- pimd/pim_ifchannel.c | 2 +- pimd/pim_join.c | 2 -- pimd/pim_sock.c | 16 ---------------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index ef4c23e95f..1222ac29c9 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -610,7 +610,7 @@ static int nonlocal_upstream(int is_join, is_local = (upstream.s_addr == recv_pim_ifp->primary_address.s_addr); - if (PIM_DEBUG_PIM_TRACE) { + if (PIM_DEBUG_PIM_TRACE_DETAIL) { char up_str[INET_ADDRSTRLEN]; pim_inet4_dump("", upstream, up_str, sizeof(up_str)); zlog_warn("%s: recv %s (S,G)=%s to %s upstream=%s on %s", diff --git a/pimd/pim_join.c b/pimd/pim_join.c index ff41b28ba4..c12fc588ff 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -214,8 +214,6 @@ int pim_joinprune_recv(struct interface *ifp, int remain; int group; - on_trace(__PRETTY_FUNCTION__, ifp, src_addr); - buf = tlv_buf; pastend = tlv_buf + tlv_buf_size; diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 12f222bb80..e69ad98f8c 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -384,14 +384,6 @@ int pim_socket_recvfromto(int fd, uint8_t *buf, size_t len, if (ifindex) *ifindex = i->ipi_ifindex; - if (to && PIM_DEBUG_PACKETS) { - char to_str[INET_ADDRSTRLEN]; - pim_inet4_dump("", to->sin_addr, to_str, sizeof(to_str)); - zlog_debug("%s: HAVE_IP_PKTINFO to=%s,%d", - __PRETTY_FUNCTION__, - to_str, ntohs(to->sin_port)); - } - break; } #endif @@ -404,14 +396,6 @@ int pim_socket_recvfromto(int fd, uint8_t *buf, size_t len, if (tolen) *tolen = sizeof(struct sockaddr_in); - if (to && PIM_DEBUG_PACKETS) { - char to_str[INET_ADDRSTRLEN]; - pim_inet4_dump("", to->sin_addr, to_str, sizeof(to_str)); - zlog_debug("%s: HAVE_IP_RECVDSTADDR to=%s,%d", - __PRETTY_FUNCTION__, - to_str, ntohs(to->sin_port)); - } - break; } #endif -- 2.39.5