summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2004-04-20 15:13:15 +0000
committerpaul <paul>2004-04-20 15:13:15 +0000
commit545acafbf599b3d163813e6640a1f83703ebda2e (patch)
treedd2c4b6288cf4cd34a381c280c995d85c40c8ecc
parent6b3fac0aab9ea72c927531df4c20a6e60df650fe (diff)
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
-rw-r--r--bgpd/ChangeLog5
-rw-r--r--bgpd/bgp_route.c2
-rw-r--r--bgpd/bgp_route.h1
-rw-r--r--bgpd/bgpd.c21
-rw-r--r--bgpd/bgpd.h6
5 files changed, 32 insertions, 3 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index f28e6a0c..9250785c 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 1d7a0524..7025a8ff 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -1568,7 +1568,7 @@ bgp_clear_adj_in (struct peer *peer, afi_t afi, safi_t safi)
/* 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 a11aa143..fd97617a 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -119,6 +119,7 @@ struct bgp_static
/* 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 f4c8f762..ae8af9f4 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4612,3 +4612,24 @@ bgp_init ()
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 a8bfa52f..6f22e53d 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -558,14 +558,16 @@ struct bgp_nlri
#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