diff options
author | Chirag Shah <chirag@nvidia.com> | 2020-12-10 22:59:56 +0100 |
---|---|---|
committer | Chirag Shah <chirag@nvidia.com> | 2020-12-12 23:08:16 +0100 |
commit | 5bbd2cc1e62d45a4edbd35995617eca1492ae90d (patch) | |
tree | cec82b3f6ada35b949b6efb41c906cf450948b31 /bgpd/bgp_evpn.c | |
parent | Merge pull request #7713 from ranjanyash54/2371 (diff) | |
download | frr-5bbd2cc1e62d45a4edbd35995617eca1492ae90d.tar.xz frr-5bbd2cc1e62d45a4edbd35995617eca1492ae90d.zip |
bgpd: fix evpn route-map vni filter at origin
evpn route-map match (filter) on vni is not working
at the origin of the routes.
evpn match vni route checks for encap type as vxlan.
the source route attribute is not set with vxlan encap
thus the match filter wouldn't work.
Ticket:CM-32554
Reviewed By:CCR-11056
Testing Done:
At source have match vni plus set statement in route-map.
Validate the origin of the route's outbound correctly sets
the 'set' statment based on match vni filter.
At origin:
route-map RM-EVPN-TE-Matches permit 10
match evpn vni 4001
set large-community 10:10:119
Receiving end:
Route [5]:[0]:[24]:[78.41.1.0] VNI 4001
5550
27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
Origin incomplete, metric 0, valid, external, bestpath-from-AS 5550, best (First path received)
Extended Community: RT:5550:4001 ET:8 Rmac:00:02:00:00:00:4d
Large Community: 10:10:119 <--- Large community stamped
Last update: Thu Dec 10 22:19:26 2020
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Diffstat (limited to 'bgpd/bgp_evpn.c')
-rw-r--r-- | bgpd/bgp_evpn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 15d647f4d..b85a5c363 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -743,6 +743,7 @@ static void build_evpn_type5_route_extcomm(struct bgp *bgp_vrf, } else ecom = ecommunity_dup(&ecom_encap); attr->ecommunity = ecom; + attr->encap_tunneltype = tnl_type; /* Add the export RTs for L3VNI/VRF */ vrf_export_rtl = bgp_vrf->vrf_export_rtl; @@ -799,6 +800,7 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr, /* Add Encap */ attr->ecommunity = ecommunity_dup(&ecom_encap); + attr->encap_tunneltype = tnl_type; /* Add the export RTs for L2VNI */ for (ALL_LIST_ELEMENTS(vpn->export_rtl, node, nnode, ecom)) |