]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: Fix for crash when non area 0 network entered first
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 23 Feb 2016 23:47:55 +0000 (18:47 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 23 Feb 2016 23:47:55 +0000 (18:47 -0500)
When a user specifies a non area 0 network in an ospf6d
config the daemon could crash.

Ticket: CM-9134
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospf6d/ospf6_abr.c

index fa3df6856468eaca6d17983d55e33ebb8cfb5561..527d2ecfa767fd9241f734760c82b85ad65142d2 100644 (file)
@@ -984,6 +984,14 @@ ospf6_abr_examin_brouter (u_int32_t router_id)
   else
     oa = listgetdata(listhead(ospf6->area_list));
 
+  /*
+   * It is possible to designate a non backbone
+   * area first.  If that is the case safely
+   * fall out of this function.
+   */
+  if (oa == NULL)
+    return;
+
   type = htons (OSPF6_LSTYPE_INTER_ROUTER);
   for (lsa = ospf6_lsdb_type_router_head (type, router_id, oa->lsdb); lsa;
        lsa = ospf6_lsdb_type_router_next (type, router_id, lsa))