mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-16 11:34:14 +00:00
bgpd: fix bgp node created at withdraw event
The prefixes unexportation triggers an attempt to create
the VPN prefix node if that prefix was not already present.
For instance, if a given prefix is not exported because of
a route-map filtering, the withdraw process will try to
create the node with the 'bgp_afi_node_get()' command.
Fix this by replacing this call by the 'bgp_safi_node_lookup()'
function.
Fixes: ddb5b4880b
("bgpd: vpn-vrf route leaking")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
e746985295
commit
b43ea569d9
@ -1904,14 +1904,14 @@ void vpn_leak_from_vrf_withdraw(struct bgp *to_bgp, /* to */
|
||||
return;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
zlog_debug("%s: withdrawing (path_vrf=%p)", __func__, path_vrf);
|
||||
|
||||
bn = bgp_afi_node_get(to_bgp->rib[afi][safi], afi, safi, p,
|
||||
&(from_bgp->vpn_policy[afi].tovpn_rd));
|
||||
bn = bgp_safi_node_lookup(to_bgp->rib[afi][safi], safi, p,
|
||||
&(from_bgp->vpn_policy[afi].tovpn_rd));
|
||||
|
||||
if (!bn)
|
||||
return;
|
||||
if (debug)
|
||||
zlog_debug("%s: withdrawing (path_vrf=%p)", __func__, path_vrf);
|
||||
|
||||
/*
|
||||
* vrf -> vpn
|
||||
* match original bpi imported from
|
||||
|
Loading…
Reference in New Issue
Block a user