netinet6: Improve handling of auto link-local address configuration
authorAaron LI <aly@aaronly.me>
Sat, 2 Mar 2024 15:59:12 +0000 (23:59 +0800)
committerAaron LI <aly@aaronly.me>
Sun, 3 Mar 2024 08:32:46 +0000 (16:32 +0800)
commitfca046ffd622e08c1b9b73e7e73d272f6cee9c7d
tree378801b215fdcf8fb6f53e51d0bdd9b85cd8f54b
parentad6688694db348e9896cc985a8e9bdc66f6033e8
netinet6: Improve handling of auto link-local address configuration

Add a new per-interface flag 'ND6_IFF_AUTO_LINKLOCAL' and convert the
sysctl 'net.inet6.ip6.auto_linklocal' to be the default value of this
new per-interface flag.  This allows to fine control the automatic
link-local address configuration on a per-interface basis.

Update ndp(8) to support to toggle the 'ND6_IFF_AUTO_LINKLOCAL' flag by
adding the 'auto_linklocal' option.

Document the 'IPV6CTL_AUTO_LINKLOCAL' option in the inet6(4) man page.

Derived from FreeBSD.
share/man/man4/inet6.4
sys/netinet6/in6_ifattach.c
sys/netinet6/in6_proto.c
sys/netinet6/nd6.c
sys/netinet6/nd6.h
usr.sbin/ndp/ndp.8
usr.sbin/ndp/ndp.c