]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Fix crash with interface not configed under pim.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 24 Aug 2016 12:29:24 +0000 (08:29 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:07 +0000 (20:26 -0500)
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 <sharpd@cumulusnetworks.com>
pimd/pim_upstream.c

index 03ca3b6edcc14957012d88f305c826a7ff1c3f31..ffb026603eceeffffb11e58259ba5ea32b6ace03 100644 (file)
@@ -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;