summaryrefslogtreecommitdiff
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c4
1 files changed, 4 insertions, 0 deletions
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)