diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/defaults/rc.conf | 3 | ||||
-rw-r--r-- | etc/network.subr | 6 | ||||
-rwxr-xr-x | etc/rc.d/netoptions | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index d467eaa..d959f20 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -468,6 +468,9 @@ ipv6_static_routes="" # Set to static route list (or leave empty). # route toward loopback interface. #ipv6_route_xxx="fec0:0000:0000:0006:: -prefixlen 64 ::1" ipv6_gateway_enable="NO" # Set to YES if this host will be a gateway. +ipv6_cpe_wanif="NO" # Set to the upstram interface name if this + # node will work as a router to forward IPv6 + # packets not explicitly addressed to itself. ipv6_privacy="NO" # Use privacy address on RA-receiving IFs # (RFC 4193) diff --git a/etc/network.subr b/etc/network.subr index 44a5892..ae3db56 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -113,6 +113,12 @@ ifconfig_up() ;; esac + case $ipv6_cpe_wanif in + $1) + _ipv6_opts="${_ipv6_opts} -no_radr accept_rtadv" + ;; + esac + if [ -n "${_ipv6_opts}" ]; then ifconfig $1 inet6 ${_ipv6_opts} fi diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 09ed6ef..1547ade 100755 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -106,6 +106,19 @@ netoptions_inet6() ${SYSCTL} net.inet6.ip6.use_tempaddr=1 >/dev/null ${SYSCTL} net.inet6.ip6.prefer_tempaddr=1 >/dev/null fi + + case $ipv6_cpe_wanif in + ""|[Nn][Oo]|[Nn][Oo][Nn][Ee]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + ${SYSCTL} net.inet6.ip6.no_radr=0 >/dev/null + ${SYSCTL} net.inet6.ip6.rfc6204w3=0 >/dev/null + ;; + *) + netoptions_init + echo -n " IPv6 CPE WANIF=${ipv6_cpe_wanif}" + ${SYSCTL} net.inet6.ip6.no_radr=1 >/dev/null + ${SYSCTL} net.inet6.ip6.rfc6204w3=1 >/dev/null + ;; + esac } load_rc_config $name |