summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2010-02-03 16:18:42 +0000
committerume <ume@FreeBSD.org>2010-02-03 16:18:42 +0000
commit0b55670b9d71a9fa67a6f45a0e56ad67c615550d (patch)
tree647a6ac93e4300c39d9f1814eccb039cfcda217d /etc
parent36b8bef13cd6d4e55f86bf271e1e64c417577f7c (diff)
downloadFreeBSD-src-0b55670b9d71a9fa67a6f45a0e56ad67c615550d.zip
FreeBSD-src-0b55670b9d71a9fa67a6f45a0e56ad67c615550d.tar.gz
Add rc.d script for the rtsold(8) daemon.
The rtsol(8) handles just one RA then exit. So, the OtherConfig flag may not be handled well by rtsol(8) in the environment where there are multiple RA servers on the segment. In such case, rtsold(8) will be your friend. Reviewed by: hrs MFC after: 2 weeks
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf4
-rw-r--r--etc/network.subr4
-rwxr-xr-xetc/rc.d/Makefile2
-rwxr-xr-xetc/rc.d/rtsold26
4 files changed, 34 insertions, 2 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 606c510..cae0d51 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -460,6 +460,10 @@ ipv6_default_interface="NO" # Default output interface for scoped addrs.
# Now this works only for IPv6 link local
# multicast addrs.
rtsol_flags="" # Flags to IPv6 router solicitation.
+rtsold_enable="NO" # Set to YES to enable an IPv6 router
+ # solicitation daemon.
+rtsold_flags="-a" # Flags to an IPv6 router solicitation
+ # daemon.
rtadvd_enable="NO" # Set to YES to enable an IPv6 router
# advertisement daemon. If set to YES,
# this router becomes a possible candidate
diff --git a/etc/network.subr b/etc/network.subr
index 633559f..fbf3ff9 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -882,7 +882,9 @@ ipv6_accept_rtadv_up()
{
if ipv6_autoconfif $1; then
ifconfig $1 inet6 accept_rtadv up
- rtsol ${rtsol_flags} $1
+ if ! checkyesno rtsold_enable; then
+ rtsol ${rtsol_flags} $1
+ fi
fi
}
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index 7f72303..d0e24b3 100755
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -30,7 +30,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \
powerd power_profile ppp pppoed pwcheck \
quota \
random rarpd resolv rfcomm_pppd_server root \
- route6d routed routing rpcbind rtadvd rwho \
+ route6d routed routing rpcbind rtadvd rtsold rwho \
savecore sdpd securelevel sendmail \
serial sppp statd static_arp stf swap1 \
syscons sysctl syslogd \
diff --git a/etc/rc.d/rtsold b/etc/rc.d/rtsold
new file mode 100755
index 0000000..bbecebb
--- /dev/null
+++ b/etc/rc.d/rtsold
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: rtsold
+# REQUIRE: netif
+# BEFORE: NETWORKING
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="rtsold"
+rcvar=`set_rcvar`
+command="/usr/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+start_postcmd="rtsold_poststart"
+
+rtsold_poststart()
+{
+ # wait for DAD
+ sleep $(($(${SYSCTL_N} net.inet6.ip6.dad_count) + 1))
+}
+
+load_rc_config $name
+run_rc_command "$1"
OpenPOWER on IntegriCloud