diff options
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r-- | bgpd/bgpd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index a5d73fdd..56358b97 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4703,16 +4703,17 @@ bgp_terminate (int terminating, int retain_mode) struct listnode *mnode, *mnnode; bgp_notify notification = NULL; - if (!retain_mode) - notification = bgp_notify_new(BGP_NOTIFY_CEASE, - BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN, 0); - program_terminating = terminating; /* Disable all peers */ for (ALL_LIST_ELEMENTS (bm->bgp, mnode, mnnode, bgp)) for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer)) { + notification = (retain_mode) + ? NULL + : bgp_notify_new(BGP_NOTIFY_CEASE, + BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN, 0); + if (terminating) bgp_peer_disable(peer, notification); else |