svn commit: r232906 - in stable/8/etc: . rc.d
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Mar 12 22:13:18 UTC 2012
Author: bz
Date: Mon Mar 12 22:13:17 2012
New Revision: 232906
URL: http://svn.freebsd.org/changeset/base/232906
Log:
MFC r232515:
Rather than printing the output from route add for all FIBs just print them
for the default FIB followed by a statement with a list of FIB numbers for
all the other FIBs we install the routes for.
Modified:
stable/8/etc/network.subr
stable/8/etc/rc.d/routing
Directory Properties:
stable/8/etc/ (props changed)
Modified: stable/8/etc/network.subr
==============================================================================
--- stable/8/etc/network.subr Mon Mar 12 22:10:58 2012 (r232905)
+++ stable/8/etc/network.subr Mon Mar 12 22:13:17 2012 (r232906)
@@ -1134,12 +1134,18 @@ network6_default_interface_setup()
route add -inet6 fe80:: -prefixlen 10 ::1 -reject
case ${ipv6_default_interface} in
[Nn][Oo] | '')
- i=0
- while test ${i} -lt ${fibs}; do
- setfib -F ${i} \
- route add -inet6 ff02:: -prefixlen 16 ::1 -reject
- i=$((i + 1))
- done
+ route add -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 add -inet6 \
+ ff02:: -prefixlen 16 ::1 -reject
+ printf " %d" ${i}
+ i=$((i + 1))
+ done
+ printf "\n"
+ fi
;;
*)
laddr=`network6_getladdr ${ipv6_default_interface}`
@@ -1147,11 +1153,16 @@ network6_default_interface_setup()
# route to all others.
route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface
i=1
- while test ${i} -lt ${fibs}; do
- setfib -F ${i} \
- route add -inet6 ff02:: -prefixlen 16 ::1 -reject
- i=$((i + 1))
- done
+ if test ${i} -lt ${fibs}; then
+ printf "Also installing reject routes for FIBs"
+ while test ${i} -lt ${fibs}; do
+ setfib -F ${i} route add -inet6 \
+ ff02:: -prefixlen 16 ::1 -reject
+ printf " %d" ${i}
+ i=$((i + 1))
+ done
+ printf "\n"
+ fi
# Disable installing the default interface with the
# case net.inet6.ip6.forwarding=0 and
Modified: stable/8/etc/rc.d/routing
==============================================================================
--- stable/8/etc/rc.d/routing Mon Mar 12 22:10:58 2012 (r232905)
+++ stable/8/etc/rc.d/routing Mon Mar 12 22:13:17 2012 (r232906)
@@ -68,14 +68,21 @@ static_start()
: ${fibs:=1}
# disallow "internal" addresses to appear on the wire
- i=0
- while test ${i} -lt ${fibs}; do
- setfib -F ${i} route add -inet6 \
- ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
- setfib -F ${i} route add -inet6 \
- ::0.0.0.0 -prefixlen 96 ::1 -reject
- i=$((i + 1))
- done
+ route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
+ route add -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 add -inet6 \
+ ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
+ setfib -F ${i} route -q add -inet6 \
+ ::0.0.0.0 -prefixlen 96 ::1 -reject
+ printf " %d" ${i}
+ i=$((i + 1))
+ done
+ printf "\n"
+ fi
fi
}
More information about the svn-src-all
mailing list