]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fixes related to use of L2VPN/EVPN
authorvivek <vivek@cumulusnetworks.com>
Mon, 15 May 2017 21:28:38 +0000 (14:28 -0700)
committervivek <vivek@cumulusnetworks.com>
Thu, 25 May 2017 17:20:04 +0000 (10:20 -0700)
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>
bgpd/bgp_packet.c
bgpd/bgpd.c
bgpd/bgpd.h

index da6bf5c3cb178f36cc6a67c59e7ca53d9de8a06d..6f84a22588d1edaadd751d462ad0ffeca769d778 100644 (file)
@@ -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
index 9d404b16dc011616cfd3a3225cfa70eb262100f2..98ca4cf9d772ff0537d853aff36af705d46b9401 100644 (file)
@@ -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;
 }
index 84dcb7e1d966a651d4a28eac9a7916f4d6ad11f9..6c443fd6502bf81186dac3c28e4b1e56f391ec41 100644 (file)
@@ -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;
 }