summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasso <hasso>2005-03-21 10:28:14 +0000
committerhasso <hasso>2005-03-21 10:28:14 +0000
commit6cf159b97848503ee9da0273eb97a6712369fd24 (patch)
treec2c19bab97b455fceea49a763430cc709a61682a
parentdb8eaac6615dacf17eb3958b0f3b6ea58f8f1e1d (diff)
* bgp_route.c: Don't crash while clearing route tables if there is
no particular afi/safi configured. [backport candidate]
-rw-r--r--bgpd/ChangeLog5
-rw-r--r--bgpd/bgp_route.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 29114c89..d107fa6e 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-21 Hasso Tepper <hasso at quagga.net>
+
+ * bgp_route.c: Don't crash while clearing route tables if there is
+ no particular afi/safi configured.
+
2005-02-23 Hasso Tepper <hasso at quagga.net>
* bgp_route.c: Make reannouncing prefixes with changed attributes
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 8c8fa528..9009638d 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2270,6 +2270,10 @@ bgp_clear_route_table (struct peer *peer, afi_t afi, safi_t safi,
if (! table)
table = (rsclient) ? rsclient->rib[afi][safi] : peer->bgp->rib[afi][safi];
+ /* If still no table => afi/safi isn't configured at all or smth. */
+ if (! table)
+ return;
+
for (rn = bgp_table_top (table); rn; rn = bgp_route_next (rn))
{
for (ri = rn->info; ri; ri = ri->next)