diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2022-11-28 19:13:37 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2022-11-28 19:13:37 +0000 |
commit | 88e7e17e35225e06b4098f1653bdb09722029837 (patch) | |
tree | 1080614eebbcba8ff0d3c3e3f58846092cb73702 /sys/netinet6/nd6.c | |
parent | 88b980ecb8ed908ea065dce2417b5f7d964644ef (diff) |
Document struct nd_ifinfo protection, remove obsolete .initialized member
All access to struct ifnet's member *if_nd is read-only, with the one
write exception being nd6_slowtimo() updating ND information.
IPv6 Neighbour Discovery information is fully protected by the net lock.
---
nd6_ifattach() allocates and unconditionally initialises struct ifnet's
*if_nd member, so early in if_attachsetup() that there is no way to query
unitialised Neighour Unreachable Detection bits.
Only SIOCGIFINFO_IN6 through ndp(8) used the .initialized member:
Added/set since 2002 sys/netinet6/nd6.c r1.42
attach nd_ifinfo structure to if_afdata.
split IPv6 MTU (advertised by RA) from real link MTU.
sync with kame
Read since 2002 usr.sbin/ndp/ndp.c r1.16
use new SIOCGIFINFO_IN6. random other cleanups. sync w/kame.
Obsolete since 2017 sys/netinet6/nd6.c r1.217
usr.sbin/ndp/ndp.c r1.85
Remove knob and always do neighbor unreachable detection.
Feedback OK bluhm
Diffstat (limited to 'sys/netinet6/nd6.c')
-rw-r--r-- | sys/netinet6/nd6.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 18b590aa738..8cedafd1d35 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.255 2022/11/28 13:10:58 kn Exp $ */ +/* $OpenBSD: nd6.c,v 1.256 2022/11/28 19:13:36 kn Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -124,8 +124,6 @@ nd6_ifattach(struct ifnet *ifp) nd = malloc(sizeof(*nd), M_IP6NDP, M_WAITOK | M_ZERO); - nd->initialized = 1; - nd->basereachable = REACHABLE_TIME; nd->reachable = ND_COMPUTE_RTIME(nd->basereachable); nd->retrans = RETRANS_TIMER; |