]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ospfd] CID #14, NULL check ospf->backbone before use, ospf_update_router_route
authorPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 23:04:45 +0000 (23:04 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 23:04:45 +0000 (23:04 +0000)
2006-05-12 Paul Jakma <paul.jakma@sun.com>

* ospf_ia.c: (ospf_update_router_route) ospf->backbone could be
  NULL when passed to ospf_find_asbr_route_through_area,
  check for NULL first, CID #14.

ospfd/ChangeLog
ospfd/ospf_ia.c

index 72e363e9a3382e0283ccf147e5b47dfc3ace5aa2..82e745cae293fd9cfbc554ae7631e59c9c541908 100644 (file)
@@ -13,6 +13,9 @@
        * ospf_asbr.h: (ospf_redistribute_withdraw) update declaration
        * ospf_zebra.c: (ospf_redistribute_unset) update call to
          ospf_redistribute_withdraw to match.
+       * ospf_ia.c: (ospf_update_router_route) ospf->backbone could be
+         NULL when passed to ospf_find_asbr_route_through_area,
+         check for NULL first, CID #14.
 
 2006-05-11 Paul Jakma <paul.jakma@sun.com>
 
index a701e8c9fd5dfc3a1c53a299330486d4920417cf..6a8c3c631b9f9504087db23ebb58b0c9aff8457b 100644 (file)
@@ -464,13 +464,11 @@ ospf_update_router_route (struct ospf *ospf,
 
   if ((ospf->backbone == NULL) &&
       (ospf->abr_type != OSPF_ABR_SHORTCUT))
-
-     /* no BB area, not Shortcut ABR, exiting */
-     return;
-  or = ospf_find_asbr_route_through_area (rtrs, p, ospf->backbone);
-
-  if (or == NULL)
+     return; /* no BB area, not Shortcut ABR, exiting */
+  
+  /* find the backbone route, if possible */
+  if ((ospf->backbone == NULL)
+      || !(or = ospf_find_asbr_route_through_area (rtrs, p, ospf->backbone)))
     {
       if (ospf->abr_type != OSPF_ABR_SHORTCUT)