summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2025-01-22 07:04:18 +0200
committerGitHub <noreply@github.com>2025-01-22 07:04:18 +0200
commit3ff48febe7b95d69fec6e14e686c9497ec517dfd (patch)
tree18e92800cf4741e373bb372dd569b152fbf2a8e6
parent15c7917cbd989f1df9304dfb992706b37d7a4d7e (diff)
parent667bb6b43bb550808b51c2bf853870b650a782e9 (diff)
Merge pull request #17892 from FRRouting/mergify/bp/stable/10.1/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 060ee2f2c8..2e9c54e126 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -3332,12 +3332,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);