]> git.puffer.fish Git - mirror/frr.git/commitdiff
* bgp_route.c: Don't crash while clearing route tables if there is
authorhasso <hasso>
Mon, 21 Mar 2005 10:28:14 +0000 (10:28 +0000)
committerhasso <hasso>
Mon, 21 Mar 2005 10:28:14 +0000 (10:28 +0000)
          no particular afi/safi configured.

[backport candidate]

bgpd/ChangeLog
bgpd/bgp_route.c

index 29114c89cf4114f028b50bda47779bdff74d5e1d..d107fa6eb34ecdc09640a954d085b709d5e1c4ab 100644 (file)
@@ -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
index 8c8fa528f3f8a9fb42dcaf3f8858017439b47632..9009638db9017714b11b454d3ea0e5f44e1b9a57 100644 (file)
@@ -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)