mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 05:34:41 +00:00
bgpd: withdraw fib entry on appropriate table identifier
There are cases where the table identifier is set on a bgp entry, mainly due to route-map, and associate fib entry needs to be removed. This change encompasses also the route-map reconfiguration that leads to removing the previous entry, whereas bgp update had been triggered ( this happens when software inbound reconfiguration is handled). Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
951745bdab
commit
1276ce3833
@ -3165,6 +3165,13 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id,
|
||||
goto filtered;
|
||||
}
|
||||
|
||||
if (pi && pi->attr &&
|
||||
pi->attr->rmap_table_id != new_attr.rmap_table_id) {
|
||||
if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED))
|
||||
/* remove from RIB previous entry */
|
||||
bgp_zebra_withdraw(p, pi, bgp, safi);
|
||||
}
|
||||
|
||||
if (peer->sort == BGP_PEER_EBGP) {
|
||||
|
||||
/* If we receive the graceful-shutdown community from an eBGP
|
||||
|
@ -1499,6 +1499,11 @@ void bgp_zebra_withdraw(struct prefix *p, struct bgp_path_info *info,
|
||||
api.safi = safi;
|
||||
api.prefix = *p;
|
||||
|
||||
if (info->attr->rmap_table_id) {
|
||||
SET_FLAG(api.message, ZAPI_MESSAGE_TABLEID);
|
||||
api.tableid = info->attr->rmap_table_id;
|
||||
}
|
||||
|
||||
/* If the route's source is EVPN, flag as such. */
|
||||
if (is_route_parent_evpn(info))
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE);
|
||||
|
Loading…
Reference in New Issue
Block a user