Skip to content

Commit

Permalink
bgpd: Ignore routes from evpn if VRF is unknown
Browse files Browse the repository at this point in the history
Fix for a bug, where FRR fails to install route received for an unknown but later-created VRF - detailed description can be found here FRRouting#13708

Signed-off-by: Piotr Suchy <[email protected]>
  • Loading branch information
piotrsuchy committed Jun 23, 2024
1 parent bf5f0f1 commit 0ed9c49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bgpd/bgp_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3037,6 +3037,14 @@ 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) {
if (bgp_debug_zebra(NULL))
zlog_debug(
"vrf %s: vrf_id not set, evpn route not installed",
vrf_id_to_name(bgp_vrf->vrf_id));
return -1;
}

/* Create (or fetch) route within the VRF. */
/* NOTE: There is no RD here. */
if (is_evpn_prefix_ipaddr_v4(evp)) {
Expand Down

0 comments on commit 0ed9c49

Please sign in to comment.