>Synopsis: Interface specific IPv6 'accept_rtadv' effectively always set
>to 0 at startup
>Arrival-Date: Sat Sep 19 14:10:00 +0000 2009
>Originator: Markus W Kilbinger
>Release: NetBSD 5.99.17
System: NetBSD Q 5.99.17 NetBSD 5.99.17 (Q) #22: Fri Sep 18 05:35:25 MEST 2009
Recent IPv6 changes to have interface specific 'accept_rtadv'
flags lead to a _not_ 'ip6mode=autohost' capable system after
startup, because the interface's 'accept_rtadv' flags is
always turned off during booting.
Reading the source (src/sys/netinet6/nd6.c) the reason seems
to be the initially zeroed system wide 'ip6_accept_rtadv'
struct nd_ifinfo *
nd6_ifattach(struct ifnet *ifp)
nd->flags = (ND6_IFF_PERFORMNUD |
(ip6_accept_rtadv ? ND6_IFF_ACCEPT_RTADV : 0));
Later /etc/rc.d-scripts set 'ip6_accept_rtadv=1', but I guess
it's too late for this earlier conditional to set the
interface specific 'accept_rtadv' flag accordingly.
Result is that every interface is in a not-'accept_rtadv'
state after booting (first, you can change that with ndp).
That is at least the opposite of what 'man 8 ndp' says.
Boot a -current system with 'ip6mode=autohost' and see how it
does not accept rtadv's.
Unconditionally (un)set 'ND6_IFF_ACCEPT_RTADV' flag in
... eventually adapt documentation.
Some kind of workaround:
!/usr/sbin/ndp -i $int accept_rtadv
entry in the interface's /etc/ifconfig.NNN, but this requires
'/usr/sbin' available at this early boot stage...
-> Move /usr/sbin/ndp --> /sbin/ndp ?
... depends on the intention of these changes.