]> git.puffer.fish Git - mirror/frr.git/commitdiff
nhrp: fix race condition 15348/head
authorLou Berger <lberger@labn.net>
Tue, 6 Feb 2024 23:14:07 +0000 (23:14 +0000)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 9 Feb 2024 15:58:17 +0000 (15:58 +0000)
where null lladdr recieved from zebra before nhrp next hop
is installed.

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 5d9ebe61815814804fac39597578c57e6420a69c)

nhrpd/netlink_arp.c

index cd7fb7aed496120f215718232fe225b5611f141d..c1f518bf5040ae84422b0dbb66f1ae1cfa43ac92 100644 (file)
@@ -188,6 +188,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.
                         */