mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-24 19:59:34 +00:00
Merge pull request #16044 from louis-6wind/fix-loopback-leak
bgpd: fix route leaking from the default l3vrf
This commit is contained in:
commit
c362af18e9
@ -2240,8 +2240,9 @@ static void vpn_leak_to_vrf_update_onevrf(struct bgp *to_bgp, /* to */
|
||||
* Let the kernel to decide with double lookup the real next-hop
|
||||
* interface when installing the route.
|
||||
*/
|
||||
if (src_bgp || bpi_ultimate->sub_type == BGP_ROUTE_STATIC ||
|
||||
bpi_ultimate->sub_type == BGP_ROUTE_REDISTRIBUTE) {
|
||||
if (src_vrf->vrf_id != VRF_DEFAULT &&
|
||||
(src_bgp || bpi_ultimate->sub_type == BGP_ROUTE_STATIC ||
|
||||
bpi_ultimate->sub_type == BGP_ROUTE_REDISTRIBUTE)) {
|
||||
ifp = if_get_vrf_loopback(src_vrf->vrf_id);
|
||||
if (ifp)
|
||||
static_attr.nh_ifindex = ifp->ifindex;
|
||||
|
@ -116,7 +116,7 @@ def test_vrf_route_leak_donna():
|
||||
"nexthops": [
|
||||
{
|
||||
"fib": True,
|
||||
"interfaceName": "lo",
|
||||
"interfaceName": "dummy0",
|
||||
"vrf": "default",
|
||||
"active": True,
|
||||
},
|
||||
|
@ -1,9 +1,9 @@
|
||||
VRF ray:
|
||||
B 10.0.1.0/24 [20/20] via 10.0.20.1, r2-eth1 (vrf default) inactive, weight 1, XX:XX:XX
|
||||
B 10.0.2.0/24 [20/0] is directly connected, lo (vrf default) inactive, weight 1, XX:XX:XX
|
||||
B 10.0.2.0/24 [20/0] is directly connected, r2-eth0 (vrf default) inactive, weight 1, XX:XX:XX
|
||||
B>* 10.0.3.0/24 [20/20] via 10.0.20.1, r2-eth1 (vrf default), weight 1, XX:XX:XX
|
||||
O>* 10.0.4.0/24 [110/20] via 10.0.40.4, r2-eth2, weight 1, XX:XX:XX
|
||||
B 10.0.20.0/24 [20/0] is directly connected, lo (vrf default) inactive, weight 1, XX:XX:XX
|
||||
B 10.0.20.0/24 [20/0] is directly connected, r2-eth1 (vrf default) inactive, weight 1, XX:XX:XX
|
||||
B>* 10.0.30.0/24 [20/20] via 10.0.20.1, r2-eth1 (vrf default), weight 1, XX:XX:XX
|
||||
O 10.0.40.0/24 [110/10] is directly connected, r2-eth2, weight 1, XX:XX:XX
|
||||
C>* 10.0.40.0/24 is directly connected, r2-eth2, XX:XX:XX
|
||||
|
Loading…
Reference in New Issue
Block a user