From 25273e5587c57afc353970221b1d8f16c674610e Mon Sep 17 00:00:00 2001 From: mpi Date: Thu, 8 Jun 2017 13:28:03 +0000 Subject: [PATCH] Notify userland when a new ND is reachable. The same notification is already present in ARP. From Jan Klemkow, ok bluhm@ --- sys/netinet6/nd6_nbr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index b44bc83de5d..fa8d3ed1472 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_nbr.c,v 1.116 2017/05/16 12:24:04 mpi Exp $ */ +/* $OpenBSD: nd6_nbr.c,v 1.117 2017/06/08 13:28:03 mpi Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -715,6 +715,10 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) if (is_solicited) { ln->ln_state = ND6_LLINFO_REACHABLE; ln->ln_byhint = 0; + /* Notify userland that a new ND entry is reachable. */ + KERNEL_LOCK(); + rtm_send(rt, RTM_RESOLVE, ifp->if_rdomain); + KERNEL_UNLOCK(); if (!ND6_LLINFO_PERMANENT(ln)) { nd6_llinfo_settimer(ln, ND_IFINFO(ifp)->reachable); -- 2.20.1