Pull up following revision(s) (requested by kim in ticket #1538):

usr.sbin/rtsold/rtsold.8: revision 1.37
	usr.sbin/rtsold/rtsold.8: revision 1.38
	usr.sbin/rtsold/rtsold.8: revision 1.39
	share/man/man5/ifconfig.if.5: revision 1.20
	etc/rc.d/network: revision 1.77
	etc/rc.d/network: revision 1.78 (plus patch)
	usr.sbin/rtsold/rtsold.8: revision 1.40
	usr.sbin/rtsold/rtsold.8: revision 1.41
	usr.sbin/rtsold/rtsold.8: revision 1.42
	share/man/man5/ifconfig.if.5: revision 1.19

Add rtsol to the NAME section as well

rc.d/network: improve wording of waiting for DAD to finish

Revert unrelated changes to prior

Use .Dl for one line literal display.  Add SEE ALSO.

Remove trailing dot in SEE ALSO.

Add an "rtsol" keyword to ifconfig.if for enabling IPv6 RS/RA

Sort SEE ALSO.

Update date
This commit is contained in:
martin 2020-04-23 13:59:32 +00:00
parent ee87113400
commit 245eda04ba
3 changed files with 69 additions and 15 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: network,v 1.71.8.1 2020/04/23 13:43:42 martin Exp $
# $NetBSD: network,v 1.71.8.2 2020/04/23 13:59:32 martin Exp $
#
# PROVIDE: network
@ -215,7 +215,8 @@ network_start_interfaces()
# For each line from the $ifconfig_xxN variable or the
# /etc/ifconfig.xxN file, we ignore comments and blank lines,
# treat lines beginning with "!" as commands to execute, treat
# "dhcp" as a special case to invoke dhcpcd, and for any other
# "dhcp" as a special case to invoke dhcpcd, treat "rtsol" as
# a special case to send a router solicitation, and for any other
# line we run "ifconfig xxN", using each line of the file as the
# arguments for a separate "ifconfig" invocation.
#
@ -322,6 +323,14 @@ network_start_interfaces()
${dhcpcd_flags} $int
fi
;;
rtsol)
if ! checkyesno dhcpcd; then
/sbin/sysctl -qw \
net.inet6.ip6.accept_rtadv=1
/sbin/dhcpcd -q6T --nodhcp6 $int \
>/dev/null
fi
;;
*)
# Pass args to ifconfig. Note
# that args may contain embedded
@ -447,10 +456,9 @@ network_start_ipv6_autoconf()
network_wait_dad()
{
# Wait for the DAD flags to clear form all addresses.
# Wait for the DAD flags to clear from all addresses.
if [ -n "$ifconfig_wait_dad_flags" ]; then
echo 'Waiting for DAD to complete for' \
'statically configured addresses...'
echo "Waiting for duplicate address detection to finish..."
ifconfig $ifconfig_wait_dad_flags
fi
}

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ifconfig.if.5,v 1.18 2014/12/29 14:22:25 wiz Exp $
.\" $NetBSD: ifconfig.if.5,v 1.18.8.1 2020/04/23 13:59:32 martin Exp $
.\"
.\" Copyright (c) 1996 Matthew R. Green
.\" All rights reserved.
@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd December 18, 2014
.Dd April 15, 2020
.Dt IFCONFIG.IF 5
.Os
.Sh NAME
@ -94,6 +94,23 @@ is set to true in
and any per interface configuration or restriction is done in
.Xr dhcpcd.conf 5 .
.Pp
If the line is equal to
.Dq rtsol ,
kernel processing of router advertisements will be enabled and an IPv6
router solicitation message will be sent out on the interface.
This is useful on networks where default routes can best be learned
from router advertisements.
However, if
.Sy dhcpcd
has been set to true in
.Xr rc.conf 5 ,
it is assumed that
.Xr dhcpcd 8
will take care of sending any necessary router solicitation messages and
processing received router advertisements through its configuration in
.Xr dhcpcd.conf 5
instead.
.Pp
If a line is empty, or starts with
.Sq # ,
the line will be ignored as comment.
@ -119,6 +136,19 @@ inet6 2001:db8::1 prefixlen 64 alias
inet6 2001:db8:: prefixlen 64 alias anycast
.Ed
.Pp
For networks that do not use a virtual address for the default gateway
that could be set using a single address in
.Sy defaultroute6 ,
static IPv6 address configuration could use the
.Dq rtsol
keyword instead to solicit router advertisements for learning a default
route and even achieving route redundancy given multiple responding
routers:
.Bd -literal -offset indent
inet6 2001:db8::100 prefixlen 64 alias
rtsol
.Ed
.Pp
The following example sets a network name for a wireless interface
(using quotes to protect special characters in the name),
and starts

View File

@ -1,4 +1,4 @@
.\" $NetBSD: rtsold.8,v 1.36 2014/10/12 19:53:34 christos Exp $
.\" $NetBSD: rtsold.8,v 1.36.8.1 2020/04/23 13:59:32 martin Exp $
.\" $KAME: rtsold.8,v 1.17 2001/07/09 22:30:37 itojun Exp $
.\"
.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -28,12 +28,13 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd October 12, 2014
.Dd April 15, 2020
.Dt RTSOLD 8
.Os
.\"
.Sh NAME
.Nm rtsold
.Nm rtsold ,
.Nm rtsol
.Nd router solicitation daemon
.\"
.Sh DESCRIPTION
@ -45,8 +46,23 @@ have been removed from
as their functionality is now included in
.Xr dhcpcd 8 .
.Pp
For example to send a routing solicitation message and print information
about it without changing the actual routing table:
.Bd -literal
dhcpcd -dB6T --nodhcp6 <interface>
.Ed
For example to send a router solicitation message and print information
about the response without changing the actual routing table:
.Pp
.Dl dhcpcd -dB6T --nodhcp6 < Ns Ar interface Ns \^>
.Pp
To quietly send a router solicitation message:
.Pp
.Dl dhcpcd -q6T --nodhcp6 < Ns Ar interface Ns \^>
.Pp
The
.Xr ifconfig.if 5
network interface configuration files and variables can also use an
.Dq rtsol
keyword to invoke
.Xr dhcpcd 8
to send a router solicitation message, without running it as daemon.
.\"
.Sh SEE ALSO
.Xr ifconfig.if 5 ,
.Xr dhcpcd 8