]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Ignore routes from evpn if VRF is unknown
authorPiotr Suchy <piotrsuchy6@tlen.pl>
Wed, 22 May 2024 08:41:52 +0000 (10:41 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 28 Jun 2024 08:34:57 +0000 (08:34 +0000)
Fix for a bug, where FRR fails to install route received for an unknown but later-created VRF - detailed description can be found here https://github.com/FRRouting/frr/issues/13708

Signed-off-by: Piotr Suchy <psuchy@akamai.com>
(cherry picked from commit 8044d733009dd428c291460eb8b0e539b53b78fa)

bgpd/bgp_evpn.c

index 5d6a5a59f520eb9631425e376f5c9344bb52e070..6680b54f7665546b493328dbf4b86b157c20ebdb 100644 (file)
@@ -3037,6 +3037,9 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
                        vrf_id_to_name(bgp_vrf->vrf_id), evp, parent_pi,
                        parent_pi->flags);
 
+       if (bgp_vrf->vrf_id == VRF_UNKNOWN)
+               return -1;
+
        /* Create (or fetch) route within the VRF. */
        /* NOTE: There is no RD here. */
        if (is_evpn_prefix_ipaddr_v4(evp)) {