Source-Changes-HG archive

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

[src/trunk]: src/etc add sanity check on rtadvd invocation (allowed on IPv6 r...



details:   https://anonhg.NetBSD.org/src/rev/d113e82e550a
branches:  trunk
changeset: 476021:d113e82e550a
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Sep 03 13:40:15 1999 +0000

description:
add sanity check on rtadvd invocation (allowed on IPv6 routers only).
add rc.conf entry for rtsold.

diffstat:

 etc/netstart |   5 ++---
 etc/rc       |  16 ++++++++++++++--
 etc/rc.conf  |   3 ++-
 3 files changed, 18 insertions(+), 6 deletions(-)

diffs (69 lines):

diff -r f9973303a43d -r d113e82e550a etc/netstart
--- a/etc/netstart      Fri Sep 03 13:31:29 1999 +0000
+++ b/etc/netstart      Fri Sep 03 13:40:15 1999 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: netstart,v 1.60 1999/07/04 12:51:30 itojun Exp $
+#      $NetBSD: netstart,v 1.61 1999/09/03 13:40:15 itojun Exp $
 #      from: @(#)netstart      8.1 (Berkeley) 7/23/93
 
 if [ -f /etc/rc.subr ]; then
@@ -194,8 +194,7 @@
        sysctl -w net.inet6.ip6.accept_rtadv=0
        if checkyesno ip6forwarding; then
                if checkyesno rtsol; then
-                       echo "WARNING: ip6forwarding and rtsol " \
-                               "cannot be used together."
+                       echo "WARNING: rtsol cannot be used on IPv6 router."
                else
                        sysctl -w net.inet6.ip6.forwarding=1
                fi
diff -r f9973303a43d -r d113e82e550a etc/rc
--- a/etc/rc    Fri Sep 03 13:31:29 1999 +0000
+++ b/etc/rc    Fri Sep 03 13:40:15 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc,v 1.129 1999/08/28 03:39:59 christos Exp $
+#      $NetBSD: rc,v 1.130 1999/09/03 13:40:15 itojun Exp $
 #      originally from: @(#)rc 8.2 (Berkeley) 3/17/94
 
 # System startup script run by init on autoboot
@@ -419,8 +419,20 @@
        echo -n ' route6d';             route6d $route6d_flags
 fi
 
+if checkyesno rtsold; then
+       if checkyesno ip6forwarding; then
+               logger -s "WARNING: rtsold cannot be used on IPv6 router."
+       else
+               echo -n ' rtsold';      rtsold $rtsold_flags
+       fi
+fi
+
 if checkyesno rtadvd; then
-       echo -n ' rtadvd';              rtadvd $rtadvd_flags
+       if checkyesno ip6forwarding; then
+               echo -n ' rtadvd';      rtadvd $rtadvd_flags
+       else
+               logger -s "WARNING: rtadvd cannot be used on IPv6 host."
+       fi
 fi
 
 if checkyesno timed; then
diff -r f9973303a43d -r d113e82e550a etc/rc.conf
--- a/etc/rc.conf       Fri Sep 03 13:31:29 1999 +0000
+++ b/etc/rc.conf       Fri Sep 03 13:40:15 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc.conf,v 1.56 1999/08/16 20:01:03 is Exp $
+#      $NetBSD: rc.conf,v 1.57 1999/09/03 13:40:16 itojun Exp $
 #
 # see rc.conf(5) for more information.
 
@@ -79,6 +79,7 @@
 gated=NO               gated_flags=""
 mrouted=NO             mrouted_flags=""
 route6d=NO             route6d_flags=""
+rtsold=NO              rtsold_flags=""         # not really routing daemon...
 
 # Daemons used to boot other hosts over a network
 rarpd=NO               rarpd_flags="-a"



Home | Main Index | Thread Index | Old Index