diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index ab50920dccb515..63c94bbfc4c280 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -470,8 +470,8 @@ route6d_flags="" # Flags to IPv6 routing daemon. #ipv6_prefix_ed0="fec0:0000:0000:0001 fec0:0000:0000:0002" # Examples for rtr. #ipv6_prefix_ep0="fec0:0000:0000:0003 fec0:0000:0000:0004" # Examples for rtr. ipv6_default_interface="NO" # Default output interface for scoped addrs. - # Now this works only for IPv6 link local - # multicast addrs. + # This works only with + # ipv6_gateway_enable="NO". rtsol_flags="" # Flags to IPv6 router solicitation. rtsold_enable="NO" # Set to YES to enable an IPv6 router # solicitation daemon. diff --git a/etc/rc.d/routing b/etc/rc.d/routing index befceca0752f06..30242fc4333111 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 diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index e93205be53909d..734e7a375d7de4 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd April 27, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -1370,7 +1370,7 @@ configured on that interface. If not set to .Dq Li NO , this is the default output interface for scoped addresses. -Now this works only for IPv6 link local multicast addresses. +This works only with ipv6_gateway_enable="NO". .It Va ip6addrctl_enable .Pq Vt bool If set to