Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src add ip6defaultif configuration variable in rc.conf, for conf...



details:   https://anonhg.NetBSD.org/src/rev/c98e34b37228
branches:  trunk
changeset: 482080:c98e34b37228
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Feb 13 07:47:26 2000 +0000

description:
add ip6defaultif configuration variable in rc.conf, for configuring
default outgoing interface for IPv6 host when default router list is empty.

the configuration is just for very rare case.  it is safe to leave it empty.

diffstat:

 etc/netstart             |   8 +++++++-
 etc/rc.conf              |   3 ++-
 share/man/man5/rc.conf.5 |  18 +++++++++++++++++-
 3 files changed, 26 insertions(+), 3 deletions(-)

diffs (75 lines):

diff -r 9e53144b5992 -r c98e34b37228 etc/netstart
--- a/etc/netstart      Sun Feb 13 06:17:58 2000 +0000
+++ b/etc/netstart      Sun Feb 13 07:47:26 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: netstart,v 1.73 2000/02/11 08:09:56 itojun Exp $
+#      $NetBSD: netstart,v 1.74 2000/02/13 07:47:26 itojun Exp $
 #      from: @(#)netstart      8.1 (Berkeley) 7/23/93
 
 if [ -f /etc/rc.subr ]; then
@@ -237,8 +237,14 @@
        autohost)
                echo 'IPv6 mode: autoconfigured host'
                sysctl -w net.inet6.ip6.accept_rtadv=1 >/dev/null
+               if test "x$ip6defaultif" != "x"; then
+                       ndp -I $ip6defaultif
+               fi
                ;;
        host)   echo 'IPv6 mode: host'
+               if test "x$ip6defaultif" != "x"; then
+                       ndp -I $ip6defaultif
+               fi
                ;;
        *)      echo 'WARNING: invalid value in ip6mode'
                ;;
diff -r 9e53144b5992 -r c98e34b37228 etc/rc.conf
--- a/etc/rc.conf       Sun Feb 13 06:17:58 2000 +0000
+++ b/etc/rc.conf       Sun Feb 13 07:47:26 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc.conf,v 1.72 2000/02/05 17:02:43 itojun Exp $
+#      $NetBSD: rc.conf,v 1.73 2000/02/13 07:47:26 itojun Exp $
 #
 # see rc.conf(5) for more information.
 
@@ -69,6 +69,7 @@
 ntpdate=NO             ntpdate_hosts=""        # blank: hosts in /etc/ntp.conf
 ppp_peers=""                                   # /etc/ppp/peers to call
 ip6mode=host                                   # host, autohost or router
+ip6defaultif=""                                        # for ip6mode=host/autohost only
 rtsol=NO               rtsol_flags=""          # for ip6mode=autohost only
 
 # Daemons required by servers.  These are not needed for strictly client use.
diff -r 9e53144b5992 -r c98e34b37228 share/man/man5/rc.conf.5
--- a/share/man/man5/rc.conf.5  Sun Feb 13 06:17:58 2000 +0000
+++ b/share/man/man5/rc.conf.5  Sun Feb 13 07:47:26 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: rc.conf.5,v 1.30 2000/02/11 03:14:02 itojun Exp $
+.\"    $NetBSD: rc.conf.5,v 1.31 2000/02/13 07:47:27 itojun Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" Copyright (c) 1997 Curt J. Sampson
@@ -318,6 +318,22 @@
 .Sy rtsold
 as well, if you set the variable to
 .Li autohost .
+.It Sy ip6defaultif
+This configuration is just for very rare case, you can leave it empty.
+IPv6 neighbor discovery specification (RFC2461 section 5.2)
+says that if you have no router known to you,
+you need to treat all the destination as being on-link.
+.Sy ip6defaultif
+configures the outgoing interface in this situation.
+See
+.Xr ndp 8 ,
+option
+.Fl I
+for more detail.
+The setting is for IPv6 hosts only.
+It will be ignored if
+.Sy ip6mode is set to
+.Li router .
 .It Sy rtsol
 YES or NO.
 Run



Home | Main Index | Thread Index | Old Index