]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Do not ignore auto generated VRF instances when deleting
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 28 Jan 2025 15:11:58 +0000 (17:11 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 4 Feb 2025 09:32:08 +0000 (11:32 +0200)
When VRF instance is going to be deleted inside bgp_vrf_disable(), it uses
a helper method that skips auto created VRF instances and that leads to STALE
issue.

When creating a VNI for a particular VRF vrfX with e.g. `advertise-all-vni`,
auto VRF instance is created, and then we do `router bgp ASN vrf vrfX`.

But when we do a reload bgp_vrf_disable() is called, and we miss previously
created auto instance.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_main.c

index 35600edee38770e2f68e6efc77ba6ef9191175c2..9fba1604bf4ce454674e44c0de8285ed815f5328 100644 (file)
@@ -325,7 +325,7 @@ static int bgp_vrf_disable(struct vrf *vrf)
        if (BGP_DEBUG(zebra, ZEBRA))
                zlog_debug("VRF disable %s id %d", vrf->name, vrf->vrf_id);
 
-       bgp = bgp_lookup_by_name(vrf->name);
+       bgp = bgp_lookup_by_name_filter(vrf->name, false);
        if (bgp) {
 
                vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP);