summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-01-08 16:03:39 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-01-08 17:04:18 +0100
commit8b56739eb4597cba27425254db410ec71c6914f3 (patch)
tree18006c7acf20dc87091ea060179df640deedbeee /bgpd
parentMerge pull request #7833 from donaldsharp/gr_tests (diff)
downloadfrr-8b56739eb4597cba27425254db410ec71c6914f3.tar.xz
frr-8b56739eb4597cba27425254db410ec71c6914f3.zip
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 <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgpd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index b6afa391f..2149b1458 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);
}
}