diff options
Diffstat (limited to 'bgpd/bgp_route.c')
| -rw-r--r-- | bgpd/bgp_route.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 20bf9635a3..3dfc446b2c 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2228,10 +2228,13 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn, /* advertise/withdraw type-5 routes */ if ((afi == AFI_IP || afi == AFI_IP6) && (safi == SAFI_UNICAST)) { - if (new_select) - bgp_evpn_advertise_type5_route( - bgp, &rn->p, new_select->attr, afi, safi); - else if (old_select) + if (new_select && + (!new_select->extra || !new_select->extra->parent)) + bgp_evpn_advertise_type5_route(bgp, &rn->p, + new_select->attr, + afi, safi); + else if (old_select && + (!old_select->extra || !old_select->extra->parent)) bgp_evpn_withdraw_type5_route(bgp, &rn->p, afi, safi); } |
