svn commit: r230948 - projects/multi-fibv6/head/etc/rc.d
Bjoern A. Zeeb
bz at FreeBSD.org
Fri Feb 3 15:31:48 UTC 2012
Author: bz
Date: Fri Feb 3 15:31:47 2012
New Revision: 230948
URL: http://svn.freebsd.org/changeset/base/230948
Log:
Install the IPv6 reject routes we do for the default FIB to all FIBs.
Sponsored by: Cisco Systems, Inc.
Modified:
projects/multi-fibv6/head/etc/rc.d/routing
Modified: projects/multi-fibv6/head/etc/rc.d/routing
==============================================================================
--- projects/multi-fibv6/head/etc/rc.d/routing Fri Feb 3 15:26:55 2012 (r230947)
+++ projects/multi-fibv6/head/etc/rc.d/routing Fri Feb 3 15:31:47 2012 (r230948)
@@ -137,12 +137,22 @@ static_inet()
static_inet6()
{
- local _action i
+ local _action i fibs
_action=$1
+ # get the number of FIBs supported.
+ fibs=`sysctl -n net.fibs`
+ : ${fibs:=1}
+
# 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=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
case ${ipv6_defaultrouter} in
[Nn][Oo] | '')
@@ -214,8 +224,14 @@ 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=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
case ${ipv6_default_interface} in
'')
More information about the svn-src-projects
mailing list