]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_route.c
bgpd: Route-map VNI in-filter filters out all the routes for EVPN
authorLakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Wed, 19 Jun 2019 21:29:34 +0000 (14:29 -0700)
committerLakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Mon, 22 Jul 2019 15:08:25 +0000 (08:08 -0700)
commit82b692c0cbf3760e1042840c21a7a929505f59a6
tree90a09fb1abec354db7494ba8a26db2a3347d6e75
parentb68885f9b7fecc50b74c86801c3aee31b62aa061
bgpd: Route-map VNI in-filter filters out all the routes for EVPN

Issue1: When a vni in-filter eg:"neighbor X.X.X.X route-map RM-VNI-FILTER in"
is configured under evpn address-family, all the received routes are dropped
regardless of whether the route has a matching vni or not.
(Where RM-VNI-FILTER contains "match evpn vni 100")

Issue2: Routes with 2 labels are not filtered correctly

Issue3: This filter should not get applied for MPLS routes. For MPLS routes,
we need route-map to handle a 3rd state besides match/nomatch called: noop.

Fix1: The handler bgp_update() that services the received route ignored the
route's label while deciding whether to filter it or not.
As part of the fix, the handler now uses the label info to make the
decision about whether to filter the route or not.

Fix2: route_match_vni() now tries to match both the labels within the route

Fix3: route_match_vni() should return noop when it encounters an mpls based
route. For this, route_map library should handle this 3rd state: RMAP_NOOP.

Related fix : Extract tunnel type
This fix relies on PR 4314 #4314 to extract the tunnel type from bgp extended
communities. The information about the route's tunnel type (vxlan or mpls)
is needed to apply "match evpn vni xx" rule.  This rule is applicable to
vxlan routes, and should exit safely for mpls based evpn routes.

Signed-off-by: Lakshman Krishnamoorthy lkrishnamoor@vmware.com
bgpd/bgp_route.c
bgpd/bgp_routemap.c