summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2017-08-09 14:36:00 +0000
committerflorian <florian@openbsd.org>2017-08-09 14:36:00 +0000
commit0e39def21543fc4a59a3f446fce1173c0ffbd7fc (patch)
tree554de369e083f98de5292d39f08510d64b3c77f9 /sys
parentaccept_rtadv doesn't do anything since some time. (diff)
downloadwireguard-openbsd-0e39def21543fc4a59a3f446fce1173c0ffbd7fc.tar.xz
wireguard-openbsd-0e39def21543fc4a59a3f446fce1173c0ffbd7fc.zip
Remove knob and always do neighbor unreachable detection.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/nd6.c10
-rw-r--r--sys/netinet6/nd6.h5
2 files changed, 4 insertions, 11 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index f94b4a99ae4..3568f81856c 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.216 2017/08/09 14:35:02 florian Exp $ */
+/* $OpenBSD: nd6.c,v 1.217 2017/08/09 14:36:00 florian Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -138,7 +138,6 @@ nd6_ifattach(struct ifnet *ifp)
nd->reachable = ND_COMPUTE_RTIME(nd->basereachable);
nd->retrans = RETRANS_TIMER;
/* per-interface IFXF_AUTOCONF6 needs to be set too to accept RAs */
- nd->flags = ND6_IFF_PERFORMNUD;
return nd;
}
@@ -387,16 +386,13 @@ nd6_llinfo_timer(void *arg)
break;
case ND6_LLINFO_DELAY:
- if (ndi && (ndi->flags & ND6_IFF_PERFORMNUD) != 0) {
+ if (ndi) {
/* We need NUD */
ln->ln_asked = 1;
ln->ln_state = ND6_LLINFO_PROBE;
nd6_llinfo_settimer(ln, ndi->retrans / 1000);
nd6_ns_output(ifp, &dst->sin6_addr,
&dst->sin6_addr, ln, 0);
- } else {
- ln->ln_state = ND6_LLINFO_STALE; /* XXX */
- nd6_llinfo_settimer(ln, nd6_gctimer);
}
break;
case ND6_LLINFO_PROBE:
@@ -1002,7 +998,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
ndi->ndi = *ND_IFINFO(ifp);
break;
case SIOCSIFINFO_FLAGS:
- ND_IFINFO(ifp)->flags = ndi->ndi.flags;
+ error = ENOTSUP;
break;
case SIOCSNDFLUSH_IN6: /* XXX: the ioctl name is confusing... */
/* sync kernel routing table with the default router list */
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
index d5089231e46..fa63806d040 100644
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.h,v 1.71 2017/08/09 14:35:02 florian Exp $ */
+/* $OpenBSD: nd6.h,v 1.72 2017/08/09 14:36:00 florian Exp $ */
/* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */
/*
@@ -47,13 +47,10 @@ struct nd_ifinfo {
u_int32_t basereachable; /* BaseReachableTime */
u_int32_t reachable; /* Reachable Time */
u_int32_t retrans; /* Retrans Timer */
- u_int32_t flags; /* Flags */
int recalctm; /* BaseReacable re-calculation timer */
u_int8_t initialized; /* Flag to see the entry is initialized */
};
-#define ND6_IFF_PERFORMNUD 0x1
-
struct in6_nbrinfo {
char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */
struct in6_addr addr; /* IPv6 address of the neighbor */