summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_peer.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_peer.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_peer.c')
-rw-r--r--bgpd/bgp_peer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bgpd/bgp_peer.c b/bgpd/bgp_peer.c
index 625e1d99..34dfdc79 100644
--- a/bgpd/bgp_peer.c
+++ b/bgpd/bgp_peer.c
@@ -313,10 +313,6 @@ bgp_session_has_established(bgp_session session)
/* Install next hop, as required. */
bgp_nexthop_set(peer->su_local, peer->su_remote, &peer->nexthop, peer) ;
- /* Reset capability open status flag. */
- if (! CHECK_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN))
- SET_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
-
/* Clear last notification data -- Routing Engine private field */
bgp_notify_unset(&(peer->session->notification));
@@ -740,8 +736,6 @@ bgp_peer_new (struct bgp *bgp)
}
peer->orf_plist[afi][safi] = NULL;
}
- SET_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
-
/* Create buffers. */
peer->ibuf = stream_new (BGP_MAX_PACKET_SIZE);
peer->obuf = stream_fifo_new ();
@@ -1417,6 +1411,9 @@ bgp_peer_map_peer_down(peer_down_t why_down)
case PEER_DOWN_AF_ACTIVATE:
case PEER_DOWN_RMAP_BIND:
case PEER_DOWN_RMAP_UNBIND:
+ case PEER_DOWN_DONT_CAPABILITY:
+ case PEER_DOWN_OVERRIDE_CAPABILITY:
+ case PEER_DOWN_STRICT_CAP_MATCH:
case PEER_DOWN_CAPABILITY_CHANGE:
case PEER_DOWN_PASSIVE_CHANGE:
case PEER_DOWN_MULTIHOP_CHANGE:
@@ -1755,6 +1752,9 @@ const char *peer_down_str[] =
[PEER_DOWN_AF_ACTIVATE] = "Address family activated",
[PEER_DOWN_RMAP_BIND] = "Peer-group add member",
[PEER_DOWN_RMAP_UNBIND] = "Peer-group delete member",
+ [PEER_DOWN_DONT_CAPABILITY] = "dont-capability-negotiate changed",
+ [PEER_DOWN_OVERRIDE_CAPABILITY] = "override-capability changed",
+ [PEER_DOWN_STRICT_CAP_MATCH] = "strict-capability-match changed",
[PEER_DOWN_CAPABILITY_CHANGE] = "Capability changed",
[PEER_DOWN_PASSIVE_CHANGE] = "Passive config change",
[PEER_DOWN_MULTIHOP_CHANGE] = "Multihop config change",