summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_common.h
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_common.h
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_common.h')
-rw-r--r--bgpd/bgp_common.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/bgpd/bgp_common.h b/bgpd/bgp_common.h
index 67d1afb0..0d2395ed 100644
--- a/bgpd/bgp_common.h
+++ b/bgpd/bgp_common.h
@@ -168,7 +168,7 @@ enum qafx_num
qafx_num_undef = -1, /* No defined AFI/SAFI */
qafx_num_min = 0, /* minimum valid qafx */
- qafx_num_first = 0, /* first "real" qafx */
+ qafx_num_first = 0, /* all first..last are "real" qafx */
qafx_ipv4_unicast = 0, /* iAFI = 1, iSAFI = 1 */
qafx_ipv4_multicast = 1, /* iAFI = 1, iSAFI = 2 */
@@ -186,6 +186,9 @@ enum qafx_num
qafx_count /* number of qafx */
} ;
+CONFIRM(qafx_num_other > qafx_num_last) ;
+CONFIRM(qafx_num_other == qafx_num_max) ;
+
/*------------------------------------------------------------------------------
* A qafx_set_t is a set of qafx_bit_t -- a bit-vector
*/
@@ -194,9 +197,12 @@ typedef qafx_bit_t qafx_set_t ;
enum qafx_bit
{
+ qafx_bits_min = 0,
+
qafx_set_empty = 0,
- qafx_bits_min = (1 << qafx_num_min),
+ qafx_first_bit = (1 << qafx_num_first),
+ /* first..last are all "real" qafx */
qafx_ipv4_unicast_bit = (1 << qafx_ipv4_unicast),
qafx_ipv4_multicast_bit = (1 << qafx_ipv4_multicast),
@@ -206,11 +212,22 @@ enum qafx_bit
qafx_ipv6_multicast_bit = (1 << qafx_ipv6_multicast),
qafx_ipv6_mpls_vpn_bit = (1 << qafx_ipv6_mpls_vpn),
+ qafx_last_bit = (1 << qafx_num_last),
+
qafx_other_bit = (1 << qafx_num_other),
- qafx_bits_max = (1 << qafx_count) - 1
+ qafx_bits_max = (1 << qafx_count) - 1,
+
+ qafx_known_bits = (1 << (qafx_num_last + 1)) - 1
} ;
+CONFIRM(qafx_known_bits == ( qafx_ipv4_unicast_bit
+ | qafx_ipv4_multicast_bit
+ | qafx_ipv4_mpls_vpn_bit
+ | qafx_ipv6_unicast_bit
+ | qafx_ipv6_multicast_bit
+ | qafx_ipv6_mpls_vpn_bit )) ;
+
/*------------------------------------------------------------------------------
* Conversions qafx_num <-> qafx_bit
*