]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Fix crash in connected.c due to RA change
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 15 Dec 2015 13:22:48 +0000 (05:22 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 15 Dec 2015 13:22:48 +0000 (05:22 -0800)
Back out original null pointer fix targeted it was the wrong fix.

Basically when a ip address is deleted the RA code was waiting till after
the connected pointer was deleted to set the RA appropriately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
zebra/connected.c
zebra/interface.c

index b2fababc1bc14f8f8d5d447090c1d259e9e16712..f040e9d362f28af8b1f66df5021da099ce69700c 100644 (file)
@@ -67,15 +67,15 @@ connected_withdraw (struct connected *ifc)
   /* The address is not in the kernel anymore, so clear the flag */
   UNSET_FLAG(ifc->conf, ZEBRA_IFC_QUEUED);
 
+  /* Enable RA suppression if there are no IPv6 addresses on this interface */
+  if (! ipv6_address_configured(ifc->ifp))
+    ipv6_nd_suppress_ra_set (ifc->ifp, RA_SUPPRESS);
+
   if (!CHECK_FLAG (ifc->conf, ZEBRA_IFC_CONFIGURED))
     {
       listnode_delete (ifc->ifp->connected, ifc);
       connected_free (ifc);
     }
-
-  /* Enable RA suppression if there are no IPv6 addresses on this interface */
-  if (! ipv6_address_configured(ifc->ifp))
-    ipv6_nd_suppress_ra_set (ifc->ifp, RA_SUPPRESS);
 }
 
 static void
index dcbc5a3b95fa2556fb1d20fbc3581798d628c5bc..cb4645c2f1a18eba59e5e2fb964907c43ea7fb0c 100644 (file)
@@ -1770,9 +1770,6 @@ ipv6_address_configured (struct interface *ifp)
   struct connected *connected;
   struct listnode *node;
 
-  if (!ifp)
-    return 0;
-
   for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, connected))
     if (CHECK_FLAG (connected->conf, ZEBRA_IFC_REAL) && (connected->address->family == AF_INET6))
       return 1;