diff options
author | vivek <vivek@cumulusnetworks.com> | 2017-05-15 23:28:38 +0200 |
---|---|---|
committer | vivek <vivek@cumulusnetworks.com> | 2017-05-25 19:20:04 +0200 |
commit | 3d22338f04d9554fa79fc993da95868921777354 (patch) | |
tree | e7fdf3c109f51f2f76d8677f97cf8d78a953144f | |
parent | bgpd: Fix route handling for 2-level routing tables (diff) | |
download | frr-3d22338f04d9554fa79fc993da95868921777354.tar.xz frr-3d22338f04d9554fa79fc993da95868921777354.zip |
bgpd: Fixes related to use of L2VPN/EVPN
Add checks related to AFI_L2VPN/SAFI_EVPN that were missing in some parts
of the code. Fix incorrect check skipping EVPN when sending End of RIB.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
-rw-r--r-- | bgpd/bgp_packet.c | 4 | ||||
-rw-r--r-- | bgpd/bgpd.c | 6 | ||||
-rw-r--r-- | bgpd/bgpd.h | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index da6bf5c3c..6f84a2258 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -247,8 +247,7 @@ bgp_write_packet (struct peer *peer) if (!(PAF_SUBGRP(paf))->t_coalesce && peer->afc_nego[afi][safi] && peer->synctime && ! CHECK_FLAG (peer->af_sflags[afi][safi], - PEER_STATUS_EOR_SEND) - && safi != SAFI_EVPN) + PEER_STATUS_EOR_SEND)) { SET_FLAG (peer->af_sflags[afi][safi], PEER_STATUS_EOR_SEND); @@ -1159,6 +1158,7 @@ bgp_open_receive (struct peer *peer, bgp_size_t size) peer->afc_nego[AFI_IP6][SAFI_UNICAST] = peer->afc[AFI_IP6][SAFI_UNICAST]; peer->afc_nego[AFI_IP6][SAFI_MULTICAST] = peer->afc[AFI_IP6][SAFI_MULTICAST]; peer->afc_nego[AFI_IP6][SAFI_LABELED_UNICAST] = peer->afc[AFI_IP6][SAFI_LABELED_UNICAST]; + peer->afc_nego[AFI_L2VPN][SAFI_EVPN] = peer->afc[AFI_L2VPN][SAFI_EVPN]; } /* When collision is detected and this peer is closed. Retrun diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 9d404b16d..98ca4cf9d 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3642,7 +3642,8 @@ peer_active (struct peer *peer) || peer->afc[AFI_IP6][SAFI_MULTICAST] || peer->afc[AFI_IP6][SAFI_LABELED_UNICAST] || peer->afc[AFI_IP6][SAFI_MPLS_VPN] - || peer->afc[AFI_IP6][SAFI_ENCAP]) + || peer->afc[AFI_IP6][SAFI_ENCAP] + || peer->afc[AFI_L2VPN][SAFI_EVPN]) return 1; return 0; } @@ -3660,7 +3661,8 @@ peer_active_nego (struct peer *peer) || peer->afc_nego[AFI_IP6][SAFI_MULTICAST] || peer->afc_nego[AFI_IP6][SAFI_LABELED_UNICAST] || peer->afc_nego[AFI_IP6][SAFI_MPLS_VPN] - || peer->afc_nego[AFI_IP6][SAFI_ENCAP]) + || peer->afc_nego[AFI_IP6][SAFI_ENCAP] + || peer->afc_nego[AFI_L2VPN][SAFI_EVPN]) return 1; return 0; } diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 84dcb7e1d..6c443fd65 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -1467,7 +1467,8 @@ peer_afi_active_nego (const struct peer *peer, afi_t afi) || peer->afc_nego[afi][SAFI_MULTICAST] || peer->afc_nego[afi][SAFI_LABELED_UNICAST] || peer->afc_nego[afi][SAFI_MPLS_VPN] - || peer->afc_nego[afi][SAFI_ENCAP]) + || peer->afc_nego[afi][SAFI_ENCAP] + || peer->afc_nego[afi][SAFI_EVPN]) return 1; return 0; } @@ -1487,7 +1488,8 @@ peer_group_af_configured (struct peer_group *group) || peer->afc[AFI_IP6][SAFI_MULTICAST] || peer->afc[AFI_IP6][SAFI_LABELED_UNICAST] || peer->afc[AFI_IP6][SAFI_MPLS_VPN] - || peer->afc[AFI_IP6][SAFI_ENCAP]) + || peer->afc[AFI_IP6][SAFI_ENCAP] + || peer->afc[AFI_IP6][SAFI_EVPN]) return 1; return 0; } |