Skip to content

Commit

Permalink
Merge pull request #16271 from lsang6WIND/avoid-loop
Browse files Browse the repository at this point in the history
bgpd: avoid clearing routes for peers that were never established
  • Loading branch information
riw777 authored Jun 26, 2024
2 parents cc3519f + e0ae285 commit 40f7926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bgpd/bgp_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 40f7926

Please sign in to comment.