diff options
author | neel <neel@FreeBSD.org> | 2012-12-04 04:37:42 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2012-12-04 04:37:42 +0000 |
commit | d8091074f2295a4be6817c9fe8802b9b0db9346d (patch) | |
tree | 6ef29583fd1f17922e7c5b7d49d2d96d8ff38ebb /etc/rc.d | |
parent | d45d8a8d668a9ee12073939bf775c404be8cf175 (diff) | |
parent | 6b76c5a1b878e8001537fb323cb0c88fca9dc2df (diff) | |
download | FreeBSD-src-d8091074f2295a4be6817c9fe8802b9b0db9346d.zip FreeBSD-src-d8091074f2295a4be6817c9fe8802b9b0db9346d.tar.gz |
IFC @r243836
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/Makefile | 1 | ||||
-rw-r--r-- | etc/rc.d/auditdistd | 21 | ||||
-rwxr-xr-x | etc/rc.d/routing | 44 |
3 files changed, 33 insertions, 33 deletions
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 245b0c9..aace4b1 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -19,6 +19,7 @@ FILES= DAEMON \ atm2 \ atm3 \ auditd \ + auditdistd \ bgfsck \ bluetooth \ bootparams \ diff --git a/etc/rc.d/auditdistd b/etc/rc.d/auditdistd new file mode 100644 index 0000000..0aa62e8 --- /dev/null +++ b/etc/rc.d/auditdistd @@ -0,0 +1,21 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: auditdistd +# REQUIRE: auditd +# BEFORE: DAEMON +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="auditdistd" +rcvar="${name}_enable" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/${name}" +required_files="/etc/${name}.conf" +extra_commands="reload" + +load_rc_config $name +run_rc_command "$1" diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 7e4a8ff..0fe86c7 100755 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -139,29 +139,20 @@ static_inet() static_inet6() { - local _action i fibs + local _action fibmod fibs _action=$1 # get the number of FIBs supported. - fibs=`sysctl -n net.fibs` - : ${fibs:=1} + fibs=$((`${SYSCTL_N} net.fibs` - 1)) + if [ "$fibs" -gt 0 ]; then + fibmod="-fib 0-$fibs" + else + fibmod= + fi # disallow "internal" addresses to appear on the wire - route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject - i=1 - if test ${i} -lt ${fibs}; then - printf "Also installing reject routes for FIBs" - while test ${i} -lt ${fibs}; do - setfib -F ${i} route -q ${_action} \ - -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - setfib -F ${i} route -q ${_action} \ - -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject - printf " %d" ${i} - i=$((i + 1)) - done - printf "\n" - fi + route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject ${fibmod} + route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject ${fibmod} case ${ipv6_defaultrouter} in [Nn][Oo] | '') @@ -233,21 +224,8 @@ static_inet6() # for the host case, you will allow to omit the identifiers. # Under this configuration, the packets will go to the default # interface. - route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject - route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject - i=1 - if test ${i} -lt ${fibs}; then - printf "Also installing reject routes for FIBs" - while test ${i} -lt ${fibs}; do - setfib -F ${i} route -q ${_action} \ - -inet6 fe80:: -prefixlen 10 ::1 -reject - setfib -F ${i} route -q ${_action} \ - -inet6 ff02:: -prefixlen 16 ::1 -reject - printf " %d" ${i} - i=$((i + 1)) - done - printf "\n" - fi + route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject ${fibmod} + route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject ${fibmod} case ${ipv6_default_interface} in '') |