summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_connection.c
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-08-04 11:20:31 +0100
committerChris Hall <GMCH@hestia.halldom.com>2010-08-04 11:20:31 +0100
commit11fe7d1d77cfd7b29ea14cc05b7fb2ea6ba13b74 (patch)
tree09b66e2a01eac2c3a8f610fed5bec9fbb062abfb /bgpd/bgp_connection.c
parent4af8f7adc4fe05de92cb11912af029c623feb821 (diff)
downloadquagga-11fe7d1d77cfd7b29ea14cc05b7fb2ea6ba13b74.tar.bz2
quagga-11fe7d1d77cfd7b29ea14cc05b7fb2ea6ba13b74.tar.xz
Fix various capability flags so that sessions are restarted.
For some reason (unknown) changing the following did NOT restart any active session: neighbor dont-capability-negotiate neighbor override-capability neighbor strict-capability-match since these can all change the nature of a session, this seems to be a (long time) bug, and has been fixed. Also, per RFC 5492: if (during OpenSent and OpenConfirm) get a NOTIFICATION: "Open/Unsupported Optional Parameter", treat that as "don't understand capabilities" and suppress sending of capabilities. Advanced to "ex05".
Diffstat (limited to 'bgpd/bgp_connection.c')
-rw-r--r--bgpd/bgp_connection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_connection.c b/bgpd/bgp_connection.c
index cdcfc10e..4a8109a3 100644
--- a/bgpd/bgp_connection.c
+++ b/bgpd/bgp_connection.c
@@ -130,6 +130,7 @@ bgp_connection_init_new(bgp_connection connection, bgp_session session,
* * fsm_active not active
* * notification NULL -- none received or sent
* * err no error, so far
+ * * cap_suppress do not suppress capabilities
* * su_local NULL -- no address, yet
* * su_remote NULL -- no address, yet
* * hold_timer_interval none -- set when connection is opened
@@ -275,12 +276,15 @@ bgp_connection_make_primary(bgp_connection connection)
assert(session->connections[bgp_connection_secondary] == NULL) ;
/* Move the open_state to the session.
+ * Copy the state of the cap_suppress flag
* Change the connection host to drop the primary/secondary distinction.
* Copy the negotiated hold_timer_interval and keepalive_timer_interval
* Copy the su_local and su_remote
*/
bgp_open_state_set_mov(&session->open_recv, &connection->open_recv) ;
+ session->cap_suppress = connection->cap_suppress ;
+
if (connection->host != NULL)
XFREE(MTYPE_BGP_PEER_HOST, connection->host) ;
bgp_connection_init_host(connection, "") ;
@@ -596,6 +600,7 @@ bgp_connection_add_pending(bgp_connection connection, mqueue_block mqb,
* Does not touch:
*
* * state of the connection (including exception and follow-on event)
+ * * capabilities suppress flag
* * timers -- FSM looks after those
*
* NB: nothing can be written until bgp_connection_start() has been called.