Merge pull request #16302 from FRRouting/mergify/bp/dev/10.1/pr-16271

bgpd: avoid clearing routes for peers that were never established (backport #16271)
This commit is contained in:
Donald Sharp 2024-06-27 12:16:28 -04:00 committed by GitHub
commit 6d24756b9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1241,7 +1241,7 @@ void bgp_fsm_change_status(struct peer_connection *connection,
/* Transition into Clearing or Deleted must /always/ clear all routes..
* (and must do so before actually changing into Deleted..
*/
if (status >= Clearing) {
if (status >= Clearing && (peer->established || peer == bgp->peer_self)) {
bgp_clear_route_all(peer);
/* If no route was queued for the clear-node processing,