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/ChangeLog b/bgpd/ChangeLog
index f28e6a0..9250785 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,8 @@
+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
+
2004-02-17 Paul Jakma <paul@dishone.st>
* bgpd.h: (bgp_peer) add fd_local and fd_accept
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 1d7a052..7025a8f 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -1568,7 +1568,7 @@
/* Delete all kernel routes. */
void
-bgp_terminate ()
+bgp_cleanup_routes ()
{
struct bgp *bgp;
struct listnode *nn;
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index a11aa14..fd97617 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -119,6 +119,7 @@
/* Prototypes. */
void bgp_route_init ();
+void bgp_cleanup_routes (void);
void bgp_announce_route (struct peer *, afi_t, safi_t);
void bgp_announce_route_all (struct peer *);
void bgp_default_originate (struct peer *, afi_t, safi_t, int);
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 ();
+}
+
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index a8bfa52..6f22e53 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -558,14 +558,16 @@
#define BGP_NOTIFY_UPDATE_MAL_AS_PATH 11
#define BGP_NOTIFY_UPDATE_MAX 12
-/* BGP_NOTIFY_CEASE sub codes (draft-ietf-idr-cease-subcode-00). */
+/* BGP_NOTIFY_CEASE sub codes (draft-ietf-idr-cease-subcode-05). */
#define BGP_NOTIFY_CEASE_MAX_PREFIX 1
#define BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN 2
#define BGP_NOTIFY_CEASE_PEER_UNCONFIG 3
#define BGP_NOTIFY_CEASE_ADMIN_RESET 4
#define BGP_NOTIFY_CEASE_CONNECT_REJECT 5
#define BGP_NOTIFY_CEASE_CONFIG_CHANGE 6
-#define BGP_NOTIFY_CEASE_MAX 7
+#define BGP_NOTIFY_CEASE_COLLISION_RESOLUTION 7
+#define BGP_NOTIFY_CEASE_OUT_OF_RESOURCE 8
+#define BGP_NOTIFY_CEASE_MAX 9
/* BGP_NOTIFY_CAPABILITY_ERR sub codes (draft-ietf-idr-dynamic-cap-02). */
#define BGP_NOTIFY_CAPABILITY_INVALID_ACTION 1