summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2010-04-26 15:31:58 +0000
committerume <ume@FreeBSD.org>2010-04-26 15:31:58 +0000
commitd391db900dac8eb0539b8423776e8df25c967bfd (patch)
treea438b139121790749737f36e8661bf6cc3b1b6df /etc/rc.d
parentbf49d6a9f92f8bbc5e93fc29dd4adda1d2482070 (diff)
downloadFreeBSD-src-d391db900dac8eb0539b8423776e8df25c967bfd.zip
FreeBSD-src-d391db900dac8eb0539b8423776e8df25c967bfd.tar.gz
Better handling of ipv6_default_interface using
net.inet6.ip6.use_defaultzone=1. Now, it works IPv6 link-local unicast addresses as well as IPv6 link-local multicast addresses. MFC after: 1 week
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-xetc/rc.d/routing32
1 files changed, 11 insertions, 21 deletions
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index befceca..30242fc 100755
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -210,34 +210,24 @@ static_inet6()
;;
esac
- # Disallow unicast packets without outgoing scope identifiers,
- # or route such packets to a "default" interface, if it is specified.
+ # Disallow link-local unicast packets without outgoing scope
+ # identifiers. However, if you set "ipv6_default_interface",
+ # 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
case ${ipv6_default_interface} in
'')
- route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject
;;
*)
- laddr=`network6_getladdr ${ipv6_default_interface}`
- route ${_action} -inet6 ff02:: ${laddr} -prefixlen 16 -interface
-
- # Disable installing the default interface with the
- # case net.inet6.ip6.forwarding=0 and
- # the interface with no ND6_IFF_ACCEPT_RTADV
- # to avoid conflict between the default router list and
- # the manual configured default route.
+ # Disable installing the default interface when we act
+ # as router to avoid conflict between the default
+ # router list and the manual configured default route.
if ! checkyesno ipv6_gateway_enable; then
- ifconfig ${ipv6_default_interface} nd6 | \
- while read proto options
- do
- case "${proto}:${options}" in
- nd6:*ACCEPT_RTADV*)
- ifconfig ${ipv6_default_interface} inet6 defaultif
- break
- ;;
- esac
- done
+ ifconfig ${ipv6_default_interface} inet6 defaultif
+ sysctl net.inet6.ip6.use_defaultzone=1
fi
;;
esac
OpenPOWER on IntegriCloud