From e5d33c8377b6cd1861104e8189ff69748eb5ce7e Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 23 Oct 2015 05:58:39 -0700 Subject: [PATCH] pimd: Add some debug code to unknown packet upcalls When receiving data from the kernel from the kernel socket, some calls that are received are not known what they are. Provide some more debug code to handle appropriately Signed-off-by: Donald Sharp --- pimd/pim_mroute.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 481f81e4ee..4ee2f9b851 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -200,8 +200,11 @@ int pim_mroute_msg(int fd, const char *buf, int buf_size) if (ip_hdr->ip_p) { /* this is not a kernel upcall */ if (PIM_DEBUG_PIM_TRACE) { - zlog_debug("%s: not a kernel upcall proto=%d msg_size=%d", - __PRETTY_FUNCTION__, ip_hdr->ip_p, buf_size); + pim_inet4_dump("", ip_hdr->ip_src, src_str, sizeof(src_str)); + pim_inet4_dump("", ip_hdr->ip_dst, grp_str, sizeof(grp_str)); + zlog_debug("%s: not a kernel upcall proto=%d src: %s dst: %s msg_size=%d", + __PRETTY_FUNCTION__, ip_hdr->ip_p, src_str, grp_str, buf_size); + //zlog_hexdump(buf, buf_size); } return 0; } -- 2.39.5