Skip to content

Commit

Permalink
nhrp: fix race condition
Browse files Browse the repository at this point in the history
	where null lladdr recieved from zebra before nhrp next hop
	is installed.

Signed-off-by: Lou Berger <[email protected]>
  • Loading branch information
louberger committed Feb 7, 2024
1 parent 1bc2fa3 commit 5d9ebe6
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 5d9ebe6

Please sign in to comment.