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 <dmytro.shytyi@6wind.com>
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)) {