From: Donatas Abraitis Date: Fri, 8 Jan 2021 15:03:39 +0000 (+0200) Subject: bgpd: Force BGP updates when triggering reset out X-Git-Tag: base_7.6~79^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8b56739eb4597cba27425254db410ec71c6914f3;p=matthieu%2Ffrr.git bgpd: Force BGP updates when triggering reset out When adding/removing some peer's flag we need to make sure we FORCE updates to avoid suppressing critical updates. Like entering `no neighbor x.x.x.x send-community large` would suppress updates by default and another side will have stale large communities. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index b6afa391f3..2149b14585 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3990,6 +3990,8 @@ bool peer_active_nego(struct peer *peer) void peer_change_action(struct peer *peer, afi_t afi, safi_t safi, enum peer_change_type type) { + struct peer_af *paf; + if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) return; @@ -4022,7 +4024,12 @@ void peer_change_action(struct peer *peer, afi_t afi, safi_t safi, BGP_NOTIFY_CEASE_CONFIG_CHANGE); } } else if (type == peer_change_reset_out) { - update_group_adjust_peer(peer_af_find(peer, afi, safi)); + paf = peer_af_find(peer, afi, safi); + if (paf && paf->subgroup) + SET_FLAG(paf->subgroup->sflags, + SUBGRP_STATUS_FORCE_UPDATES); + + update_group_adjust_peer(paf); bgp_announce_route(peer, afi, safi); } }