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

rivo nurges rix at estpak.ee
Tue Apr 20 13:37:08 BST 2004


Attached patch fixes UNH IOL BGP-4.1.6a

This time without breaking other things...
-- 
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	20 Apr 2004 12:45:57 -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	20 Apr 2004 12:46:00 -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/bgp_route.h
===================================================================
RCS file: /var/cvsroot/quagga/bgpd/bgp_route.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 bgp_route.h
--- bgpd/bgp_route.h	13 Dec 2002 20:15:29 -0000	1.1.1.1
+++ bgpd/bgp_route.h	20 Apr 2004 12:46:01 -0000
@@ -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);
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	20 Apr 2004 12:46:02 -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	20 Apr 2004 12:46:02 -0000
@@ -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


More information about the Quagga-dev mailing list