From: Donald Sharp Date: Wed, 24 Aug 2016 12:29:24 +0000 (-0400) Subject: pimd: Fix crash with interface not configed under pim. X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~267 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=359175704f9f4b1c2e4eae435a193db39c6db0c2;p=mirror_frr.git pimd: Fix crash with interface not configed under pim. When the RP's address in PIM is not under the loopback, we can have a situation where this causes PIM to crash. Check for NULL pointers. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 03ca3b6ed..ffb026603 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -379,7 +379,7 @@ pim_upstream_could_register (struct pim_upstream *up) { struct pim_interface *pim_ifp = up->rpf.source_nexthop.interface->info; - if (PIM_I_am_DR (pim_ifp) && + if (pim_ifp && PIM_I_am_DR (pim_ifp) && pim_if_connected_to_source (up->rpf.source_nexthop.interface, up->sg.src)) return 1;