]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Disable L3NHG support for routes leaked from another VRF
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Fri, 4 Sep 2020 15:19:49 +0000 (08:19 -0700)
committerAnuradha Karuppiah <anuradhak@nvidia.com>
Fri, 26 Mar 2021 00:09:53 +0000 (17:09 -0700)
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>
bgpd/bgp_evpn_mh.c

index 022a09aa6addd5ebeadba30a3b03ec57f6e7348a..dc6a7dd43103f871558fa01c334e7f6bd9ef6005 100644 (file)
@@ -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;