]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: When shutting down do not clear self peers
authorDonald Sharp <sharpd@nvidia.com>
Fri, 28 Mar 2025 18:54:37 +0000 (14:54 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Sun, 30 Mar 2025 18:02:16 +0000 (14:02 -0400)
Commit: e0ae285eb8beeef7b43bdadc073d8ae346eaeb6c

Modified the fsm state machine to attempt to not
clear routes on a peer that was not established.
The peer should be not a peer self.  We do not want
to ever clear the peer self.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_fsm.c

index 478f8c9136da9e1a8ff094b6be0cddc835e5bdbe..940d93a8df7729c0f37888f17a2a15f1f505df97 100644 (file)
@@ -1260,7 +1260,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 && (peer->established || peer == bgp->peer_self)) {
+       if (status >= Clearing && (peer->established || peer != bgp->peer_self)) {
                bgp_clear_route_all(peer);
 
                /* If no route was queued for the clear-node processing,