2004-04-16 rivo nurges <rix@estpak.ee>
* bgpd.h: update cease subcodes to draft-ietf-idr-cease-subcode-05
* bgpd.h, bgpd.c, bgp_route.c, bgp_route.h: fix UNH IOL BGP-4.1.6a
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index f4c8f76..ae8af9f 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4612,3 +4612,24 @@
bgp_snmp_init ();
#endif /* HAVE_SNMP */
}
+
+void
+bgp_terminate ()
+{
+ struct bgp_master *bm;
+ struct bgp *bgp;
+ struct peer *peer;
+ struct listnode *nn;
+ struct listnode *mm;
+
+ bm = bgp_get_master ();
+
+ LIST_LOOP (bm->bgp, bgp, nn)
+ LIST_LOOP (bgp->peer, peer, mm)
+ if (peer->status == Established)
+ bgp_notify_send (peer, BGP_NOTIFY_CEASE,
+ BGP_NOTIFY_CEASE_PEER_UNCONFIG);
+
+ bgp_cleanup_routes ();
+}
+