From: Donald Sharp Date: Thu, 27 Oct 2016 00:26:16 +0000 (-0400) Subject: pimd: Fix crash when igmp message comes in on non-configured interface X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~166 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3506072736df584a83af8d598e29f1aacf7ab1f9;p=mirror%2Ffrr.git pimd: Fix crash when igmp message comes in on non-configured interface When we receive a igmp message through the kernel upcall, make sure that we are configured to work on that interface via pim/igmp before attempting to use that interface. Ticket: CM-13338 Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 982aa9477a..5f8d180742 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -433,6 +433,14 @@ int pim_mroute_msg(int fd, const char *buf, int buf_size) } pim_ifp = ifp->info; + if (!pim_ifp) + { + if (PIM_DEBUG_MROUTE_DETAIL) + zlog_debug ("%s: igmp kernel upcall for interface:%s not configured for pim", + __PRETTY_FUNCTION__, ifp->name); + return 0; + } + ifaddr = pim_find_primary_addr(ifp); igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list, ifaddr);