summaryrefslogtreecommitdiff
path: root/bgpd/bgp_evpn_mh.c
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-09-04 08:19:49 -0700
committerAnuradha Karuppiah <anuradhak@nvidia.com>2021-03-25 17:09:53 -0700
commit9f570418a38bc00299a757328cc062e13cda98e7 (patch)
tree68d77bbad1fd2a6f2bae6f265291f132fa3c7ef8 /bgpd/bgp_evpn_mh.c
parent333ad64b874a6527d3109c5a112a2b90225bd359 (diff)
bgpd: Disable L3NHG support for routes leaked from another VRF
Theoretically we should just be able to use the L3 NHG in the other-VRF/nh-VRF. But there is some change list handling (when an ES is added to or removed from a VRF) that needs to be updated to account for routes in other VRFs using that ES-VRF as nexthop. Till that is done we will disable L3-NHG use for routes leaked from a different VRF. Route in tenant2 with ES/NHG as destination - =========================================== root@leaf11:mgmt:~# ip route show vrf tenant2 22.1.0.7 22.1.0.7 nhid 75000012 proto bgp metric 20 root@leaf11:mgmt:~# ip nexthop list id 75000012 id 75000012 group 103/107/111 proto bgp root@leaf11:mgmt:~# ip nexthop |grep "103\|107\|111" id 103 via 6.0.0.11 dev vlan12 scope link proto bgp onlink id 107 via 6.0.0.12 dev vlan12 scope link proto bgp onlink id 111 via 6.0.0.13 dev vlan12 scope link proto bgp onlink id 75000012 group 103/107/111 proto bgp root@leaf11:mgmt:~# Leaked into VRF1 with a flat/exploded mpaths ============================================ root@leaf11:mgmt:~# ip route show vrf tenant1 |grep -A3 22.1.0.7 22.1.0.7 proto bgp metric 20 nexthop via 6.0.0.11 dev vlan12 weight 1 onlink nexthop via 6.0.0.12 dev vlan12 weight 1 onlink nexthop via 6.0.0.13 dev vlan12 weight 1 onlink root@leaf11:mgmt:~# Ticket: CM-31115 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn_mh.c')
-rw-r--r--bgpd/bgp_evpn_mh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c
index 022a09aa6a..dc6a7dd431 100644
--- a/bgpd/bgp_evpn_mh.c
+++ b/bgpd/bgp_evpn_mh.c
@@ -2723,6 +2723,10 @@ bool bgp_evpn_path_es_use_nhg(struct bgp *bgp_vrf, struct bgp_path_info *pi,
*nhg_p = 0;
+ /* we don't support NHG for routes leaked from another VRF yet */
+ if (pi->extra && pi->extra->bgp_orig)
+ return false;
+
parent_pi = get_route_parent_evpn(pi);
if (!parent_pi)
return false;