[quagga-dev 1046] [PATCH] Fix UNH IOL BGP-4.1.6a

rivo nurges rix at estpak.ee
Fri Apr 16 18:45:18 BST 2004


Attached patch fixes NH IOL BGP-4.1.6a

-- 
rix
http://www.ripe.net/perl/whois?rix@estpak.ee
-------------- next part --------------
Index: bgpd/ChangeLog
===================================================================
RCS file: /var/cvsroot/quagga/bgpd/ChangeLog,v
retrieving revision 1.6
diff -u -3 -p -r1.6 ChangeLog
--- bgpd/ChangeLog	17 Feb 2004 19:45:10 -0000	1.6
+++ bgpd/ChangeLog	16 Apr 2004 17:39:29 -0000
@@ -1,3 +1,8 @@
+2004-04-16 rivo nurges <rix at estpak.ee>
+
+	* bgpd.h: update cease subcodes to draft-ietf-idr-cease-subcode-05
+	* bgpd.h, bgpd.c, bgp_route.c: fix UNH IOL BGP-4.1.6a
+
 2004-02-17 Paul Jakma <paul at dishone.st>
 
 	* bgpd.h: (bgp_peer) add fd_local and fd_accept 
Index: bgpd/bgp_route.c
===================================================================
RCS file: /var/cvsroot/quagga/bgpd/bgp_route.c,v
retrieving revision 1.10
diff -u -3 -p -r1.10 bgp_route.c
--- bgpd/bgp_route.c	17 Feb 2004 19:45:10 -0000	1.10
+++ bgpd/bgp_route.c	16 Apr 2004 17:39:32 -0000
@@ -1568,7 +1568,7 @@ bgp_clear_adj_in (struct peer *peer, afi
 
 /* Delete all kernel routes. */
 void
-bgp_terminate ()
+bgp_cleanup_routes ()
 {
   struct bgp *bgp;
   struct listnode *nn;
Index: bgpd/bgpd.c
===================================================================
RCS file: /var/cvsroot/quagga/bgpd/bgpd.c,v
retrieving revision 1.3
diff -u -3 -p -r1.3 bgpd.c
--- bgpd/bgpd.c	17 Feb 2004 19:45:10 -0000	1.3
+++ bgpd/bgpd.c	16 Apr 2004 17:39:34 -0000
@@ -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 ();
+}
+
Index: bgpd/bgpd.h
===================================================================
RCS file: /var/cvsroot/quagga/bgpd/bgpd.h,v
retrieving revision 1.6
diff -u -3 -p -r1.6 bgpd.h
--- bgpd/bgpd.h	17 Feb 2004 19:45:10 -0000	1.6
+++ bgpd/bgpd.h	16 Apr 2004 17:39:34 -0000
@@ -558,7 +558,7 @@ 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
@@ -566,6 +566,8 @@ struct bgp_nlri
 #define BGP_NOTIFY_CEASE_CONNECT_REJECT          5
 #define BGP_NOTIFY_CEASE_CONFIG_CHANGE           6
 #define BGP_NOTIFY_CEASE_MAX                     7
+#define BGP_NOTIFY_COLLISION_RESOLUTION          8
+#define BGP_NOTIFY_OUT_OF_RESOURCE               9
 
 /* BGP_NOTIFY_CAPABILITY_ERR sub codes (draft-ietf-idr-dynamic-cap-02). */
 #define BGP_NOTIFY_CAPABILITY_INVALID_ACTION     1
@@ -723,6 +725,7 @@ void bgp_config_write_family_header (str
 void bgp_master_init ();
 
 void bgp_init ();
+void bgp_terminate ();
 
 int bgp_option_set (int);
 int bgp_option_unset (int);


More information about the Quagga-dev mailing list