From: Dmytro Shytyi Date: Mon, 10 Mar 2025 13:59:34 +0000 (+0100) Subject: bgpd: align peer_unconfigure with gracefull-restart X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=942a7c916cc35a2ab1d7da6257810e58ab001552;p=mirror%2Ffrr.git bgpd: align peer_unconfigure with gracefull-restart When configured Graceful-Restart, skipping unconfig notification, similarly as it is done in 95098d9611e79d43b578400bb76dc7a76aa8cab9 ("bgpd: Do not send Deconfig/Shutdown message when restarting") Signed-off-by: Dmytro Shytyi --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 0f31719daf..c95bf52ec3 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4202,8 +4202,15 @@ int bgp_delete(struct bgp *bgp) if (peer->ifp || CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE)) bgp_zebra_terminate_radv(peer->bgp, peer); - peer_notify_unconfig(peer->connection); - peer_delete(peer); + if (BGP_PEER_GRACEFUL_RESTART_CAPABLE(peer)) { + if (bgp_debug_neighbor_events(peer)) + zlog_debug("%pBP configured Graceful-Restart, skipping unconfig notification", + peer); + peer_delete(peer); + } else { + peer_notify_unconfig(peer->connection); + peer_delete(peer); + } } if (bgp->peer_self && !IS_BGP_INSTANCE_HIDDEN(bgp)) {