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]>
(cherry picked from commit 5d9ebe6)
  • Loading branch information
louberger authored and mergify[bot] committed Feb 9, 2024
1 parent 9aa5c6c commit d2630a7
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 @@ -184,6 +184,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 d2630a7

Please sign in to comment.