summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2025-01-21 16:29:32 +0200
committerGitHub <noreply@github.com>2025-01-21 16:29:32 +0200
commit97b78759630ea782d07987dd6b3a87e7e02c453c (patch)
tree9dea6d4879802df4bad117372a2fe61b7e124f5e
parent5f231287a31c48d5a1dd873b0688f9177bb507cb (diff)
parent016528364e686fb3b23a688707bd6ae6c5ea5f41 (diff)
Merge pull request #17888 from krishna-samy/bgpd_mac_hash
bgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table
-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 146630ec6b..8e8616c155 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -3375,12 +3375,15 @@ static int bgp_ifp_create(struct interface *ifp)
zlog_debug("Rx Intf add VRF %s IF %s", ifp->vrf->name,
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);