summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2025-01-22 07:04:43 +0200
committerGitHub <noreply@github.com>2025-01-22 07:04:43 +0200
commit689b455c47de1d014bdfe728abed19c15c89cc15 (patch)
treef586a4c6440ed59e8d1f450ddcdfd4cbdef6a139
parent48221b1f0b57bacf46134bf04da568f85e374d5c (diff)
parent4a49bf9be86eaef0b34a8622e94c652dd988f83a (diff)
Merge pull request #17893 from FRRouting/mergify/bp/stable/10.0/pr-17888
bgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table (backport #17888)
-rw-r--r--bgpd/bgp_zebra.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index a64eb35591..f9d096e6c6 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -3141,12 +3141,15 @@ static int bgp_ifp_create(struct interface *ifp)
zlog_debug("Rx Intf add VRF %u IF %s", ifp->vrf->vrf_id,
ifp->name);
+ /* We don't need to check for vrf->bgp link to add this local MAC
+ * to the hash table as the tenant VRF might not have the BGP instance.
+ */
+ bgp_mac_add_mac_entry(ifp);
+
bgp = ifp->vrf->info;
if (!bgp)
return 0;
- bgp_mac_add_mac_entry(ifp);
-
bgp_update_interface_nbrs(bgp, ifp, ifp);
hook_call(bgp_vrf_status_changed, bgp, ifp);
return 0;