diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-05-12 23:04:45 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-05-12 23:04:45 +0000 |
commit | bfd7c7dc067f5a181a992fa0b8af31cfe5cdc9eb (patch) | |
tree | 82e34cbd32436bf38dca01d5d41825669f914760 /ospfd/ospf_ia.c | |
parent | 6db3a6f75c7206050b096dcbd4fde439b4bcb6e6 (diff) |
[ospfd] CID #14, NULL check ospf->backbone before use, ospf_update_router_route
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.
Diffstat (limited to 'ospfd/ospf_ia.c')
-rw-r--r-- | ospfd/ospf_ia.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c index a701e8c9..6a8c3c63 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) |