From: Paul Jakma Date: Fri, 12 May 2006 23:04:45 +0000 (+0000) Subject: [ospfd] CID #14, NULL check ospf->backbone before use, ospf_update_router_route X-Git-Tag: frr-2.0-rc1~2709 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=bfd7c7dc067f5a181a992fa0b8af31cfe5cdc9eb;p=mirror%2Ffrr.git [ospfd] CID #14, NULL check ospf->backbone before use, ospf_update_router_route 2006-05-12 Paul Jakma * 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. --- diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 72e363e9a3..82e745cae2 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -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 diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c index a701e8c9fd..6a8c3c631b 100644 --- a/ospfd/ospf_ia.c +++ b/ospfd/ospf_ia.c @@ -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)