Merge pull request #16271 from lsang6WIND/avoid-loop

bgpd: avoid clearing routes for peers that were never established
This commit is contained in:
Russ White 2024-06-26 16:45:44 -04:00 committed by GitHub
commit 40f79260a5
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,