From: Daniel Walton Date: Fri, 17 Jun 2016 13:44:35 +0000 (+0000) Subject: bgp_recalculate_all_bestpaths() should check if rn->info is NULL X-Git-Tag: frr-2.0-rc1~527 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=353cd37f7d22edf27664d9d56b02dd65c5daa362;p=matthieu%2Ffrr.git bgp_recalculate_all_bestpaths() should check if rn->info is NULL Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp Ticket: CM-11444 The bgp table may contain nodes without an 'info' (these nodes are used for balancing the tree, they are created by route_common() in lib/table.c). When we call bgp_recalculate_all_bestpaths() we should avoid calling bgp_process() for these nodes. bgp_recalculate_all_bestpaths() is only called when knobs are configured that could have an impact on which routes are selected as best. --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index bab20fc88f..243e800a89 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1395,7 +1395,10 @@ bgp_recalculate_all_bestpaths (struct bgp *bgp) { for (rn = bgp_table_top (bgp->rib[afi][safi]); rn; rn = bgp_route_next (rn)) { - bgp_process (bgp, rn, afi, safi); + if (rn->info != NULL) + { + bgp_process (bgp, rn, afi, safi); + } } } }