Merge pull request #15316 from LabNConsulting/working/lb/nhrp-nexthop-race-cond

nhrp: fix race condition in  null lladdr from zebra
This commit is contained in:
Donald Sharp 2024-02-08 10:31:46 -05:00 committed by GitHub
commit 9e42c61305
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -191,6 +191,11 @@ int nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS)
"Netlink: update binding for %pSU dev %s from c %pSU peer.vc.nbma %pSU to lladdr %pSU",
&addr, ifp->name, &c->cur.remote_nbma_natoa,
&c->cur.peer->vc->remote.nbma, &lladdr);
if (lladdr.sa.sa_family == AF_UNSPEC)
/* nothing from zebra, so use nhrp peer */
lladdr = c->cur.peer->vc->remote.nbma;
/* In case of shortcuts, nbma is given by lladdr, not
* vc->remote.nbma.
*/