diff options
author | Lou Berger <lberger@labn.net> | 2024-02-07 00:14:07 +0100 |
---|---|---|
committer | Lou Berger <lberger@labn.net> | 2024-02-08 00:05:20 +0100 |
commit | 5d9ebe61815814804fac39597578c57e6420a69c (patch) | |
tree | 847f87f5c259fd30a36d695c641e9b61d9a8fbc8 /nhrpd/netlink_arp.c | |
parent | Merge pull request #15305 from louis-6wind/label-dead-code (diff) | |
download | frr-5d9ebe61815814804fac39597578c57e6420a69c.tar.xz frr-5d9ebe61815814804fac39597578c57e6420a69c.zip |
nhrp: fix race condition
where null lladdr recieved from zebra before nhrp next hop
is installed.
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to '')
-rw-r--r-- | nhrpd/netlink_arp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c index 88628999a..be909c862 100644 --- a/nhrpd/netlink_arp.c +++ b/nhrpd/netlink_arp.c @@ -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. */ |