]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: add support for epvn into afindex
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 20 Jan 2017 16:13:24 +0000 (17:13 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 14 Feb 2017 12:58:57 +0000 (13:58 +0100)
afindex needs knowledge of l2vpn afi parameter, as well as evpn safi
parameter.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
bgpd/bgpd.h

index 2eef04e1d1ae511328910be868ff167d0f95ec7e..09c64aa331396f5dde1fb99b8aec26e79ccb3d95 100644 (file)
@@ -73,6 +73,7 @@ enum bgp_af_index
   BGP_AF_IPV6_VPN,
   BGP_AF_IPV4_ENCAP,
   BGP_AF_IPV6_ENCAP,
+  BGP_AF_L2VPN_EVPN,
   BGP_AF_MAX
 };
 
@@ -1414,6 +1415,16 @@ afindex (afi_t afi, safi_t safi)
          break;
        }
       break;
+    case AFI_L2VPN:
+      switch (safi)
+        {
+        case SAFI_EVPN:
+          return BGP_AF_L2VPN_EVPN;
+          break;
+        default:
+          return BGP_AF_MAX;
+          break;
+        }
     default:
       return BGP_AF_MAX;
       break;