netinet6: Improve flexibility of receiving Router Advertisement
authorAaron LI <aly@aaronly.me>
Sun, 3 Mar 2024 07:57:05 +0000 (15:57 +0800)
committerAaron LI <aly@aaronly.me>
Sun, 3 Mar 2024 08:32:47 +0000 (16:32 +0800)
commit30152012e0a16634262829b116f460bb99962bfa
tree0043374ced1f5e5a7ceaefa7c7096b067e24c6ba
parente8e97246b8efd52ab0c76db0b8f59609d0004211
netinet6: Improve flexibility of receiving Router Advertisement

Convert the sysctl 'net.inet6.ip6.accept_rtadv' to be the default value
of the per-interface flag 'ND6_IFF_ACCEPT_RTADV', making it no longer a
global knob.  Now the receiving RA is allowed if ip6_forwarding==0 *and*
'ND6_IFF_ACCEPT_RTADV' is set on that interface.

ndp(8) already supports to toggle the 'ND6_IFF_ACCEPT_RTADV' flag via
the 'accept_rtadv' option.

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