Skip to content

Commit

Permalink
Merge pull request #15316 from LabNConsulting/working/lb/nhrp-nexthop…
Browse files Browse the repository at this point in the history
…-race-cond

nhrp: fix race condition in  null lladdr from zebra
  • Loading branch information
donaldsharp authored Feb 8, 2024
2 parents aac45c8 + 5d9ebe6 commit 9e42c61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nhrpd/netlink_arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 9e42c61

Please sign in to comment.