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)
This commit is contained in:
Donatas Abraitis 2025-01-22 07:04:43 +02:00 committed by GitHub
commit 689b455c47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;