summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2012-03-04 18:53:35 +0000
committerbz <bz@FreeBSD.org>2012-03-04 18:53:35 +0000
commit82e2b8d3c6a392b5f41abd10cbd2b1b7eb2e9889 (patch)
tree43f7f9656ad5c5ecdd30ba53abda368ca559db8d /etc
parentb70c7f1db8b494621b4d87173250c90152234bc5 (diff)
downloadFreeBSD-src-82e2b8d3c6a392b5f41abd10cbd2b1b7eb2e9889.zip
FreeBSD-src-82e2b8d3c6a392b5f41abd10cbd2b1b7eb2e9889.tar.gz
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. Request by: kib (to make it less noisy) Tested by: kib MFC after: 3 days
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/routing46
1 files changed, 30 insertions, 16 deletions
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 5903acc..7e4a8ff 100755
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -147,14 +147,21 @@ static_inet6()
: ${fibs:=1}
# disallow "internal" addresses to appear on the wire
- i=0
- while test ${i} -lt ${fibs}; do
- setfib -F ${i} route ${_action} \
- -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
- setfib -F ${i} route ${_action} \
- -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
- i=$((i + 1))
- done
+ 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
case ${ipv6_defaultrouter} in
[Nn][Oo] | '')
@@ -226,14 +233,21 @@ static_inet6()
# for the host case, you will allow to omit the identifiers.
# Under this configuration, the packets will go to the default
# interface.
- i=0
- while test ${i} -lt ${fibs}; do
- setfib -F ${i} route ${_action} \
- -inet6 fe80:: -prefixlen 10 ::1 -reject
- setfib -F ${i} route ${_action} \
- -inet6 ff02:: -prefixlen 16 ::1 -reject
- i=$((i + 1))
- done
+ 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
case ${ipv6_default_interface} in
'')
OpenPOWER on IntegriCloud