From 2eb62239d7432351eb544690c4ea2fc648ae2abc Mon Sep 17 00:00:00 2001 From: hrs Date: Sat, 12 Sep 2009 22:08:20 +0000 Subject: Improve flexibility of receiving Router Advertisement and automatic link-local address configuration: - Convert a sysctl net.inet6.ip6.accept_rtadv to one for the default value of a per-IF flag ND6_IFF_ACCEPT_RTADV, not a global knob. The default value of the sysctl is 0. - Add a new per-IF flag ND6_IFF_AUTO_LINKLOCAL and convert a sysctl net.inet6.ip6.auto_linklocal to one for its default value. The default value of the sysctl is 1. - Make ND6_IFF_IFDISABLED more robust. It can be used to disable IPv6 functionality of an interface now. - Receiving RA is allowed if ip6_forwarding==0 *and* ND6_IFF_ACCEPT_RTADV is set on that interface. The former condition will be revisited later to support a "host + router" box like IPv6 CPE router. The current behavior is compatible with the older releases of FreeBSD. - The ifconfig(8) now supports these ND6 flags as well as "nud", "prefer_source", and "disabled" in ndp(8). The ndp(8) now supports "auto_linklocal". Discussed with: bz and jinmei Reviewed by: bz MFC after: 3 days --- usr.sbin/ndp/ndp.8 | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'usr.sbin/ndp/ndp.8') diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8 index 70f5156..76f558c 100644 --- a/usr.sbin/ndp/ndp.8 +++ b/usr.sbin/ndp/ndp.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 1998 +.Dd September 2, 2009 .Dt NDP 8 .Os .\" @@ -182,11 +182,16 @@ NUD is usually turned on by default. Specify whether or not to accept Router Advertisement messages received on the .Ar interface . -Note that the kernel does not accept Router Advertisement messages -unless the -.Li net.inet6.ip6.accept_rtadv -variable is non-0, even if the flag is on. -This flag is set to 1 by default. +This flag is set by +.Va net.inet6.ip6.accept_rtadv +sysctl variable. +.It Ic auto_linklocal +Specify whether or not to perform automatic link-local address configuration +on +.Ar interface . +This flag is set by +.Va net.inet6.ip6.auto_linklocal +sysctl variable. .It Ic prefer_source Prefer addresses on the .Ar interface @@ -204,9 +209,8 @@ In the sending case, an error of ENETDOWN will be returned to the application. This flag is typically set automatically in the kernel as a result of a certain failure of Duplicate Address Detection. -While the flag can be set or cleared by hand with the -.Nm -command, it is not generally advisable to modify this flag manually. +If the auto_linklocal per-interface flag is set, automatic link-local +address configuration is performed again when this flag is cleared. .It Ic basereachable Ns Li = Ns Pq Ar number Specify the BaseReachbleTimer on the interface in millisecond. .It Ic retrans Ns Li = Ns Pq Ar number @@ -253,6 +257,10 @@ Most useful when used with The .Nm utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit. +The +.Fl I Ar auto_linklocal +flag first appeared in +.Fx 8.0 . .\" .\" .Sh BUGS .\" (to be written) -- cgit v1.1