summaryrefslogtreecommitdiffstats
path: root/etc/defaults
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-04-09 01:35:09 +0000
committerdougb <dougb@FreeBSD.org>2010-04-09 01:35:09 +0000
commit2ae521fa83381fb37d51c9fbaa4bf010e9118a70 (patch)
tree04c99d982a6edeed63d52af2b85b3cad62c33907 /etc/defaults
parent4f086c2604dc3f689c57c6e0619187d74ddb1ca2 (diff)
downloadFreeBSD-src-2ae521fa83381fb37d51c9fbaa4bf010e9118a70.zip
FreeBSD-src-2ae521fa83381fb37d51c9fbaa4bf010e9118a70.tar.gz
Improve the handling of IPv6 configuration in rc.d. The ipv6_enable
and ipv6_ifconfig_<interface> options have already been deprecated, these changes do not alter that. With these changes any value set for ipv6_enable will emit a warning. In order to avoid a POLA violation for the deprecation of the option ipv6_enable=NO will still disable configuration for all interfaces other than lo0. ipv6_enable=YES will not have any effect, but will emit an additional warning. Support and warnings for this option will be removed in FreeBSD 10.x. Consistent with the current code, in order for IPv6 to be configured on an interface (other than lo0) an ifconfig_<interface>_ipv6 option will have to be added to /etc/rc.conf[.local]. 1. Clean up and minor optimizations for the following functions: ifconfig_up (the ipv6 elements) ipv6if ipv6_autoconfif get_if_var _ifconfig_getargs The cleanups generally were to move the "easy" tests earlier in the functions, and consolidate duplicate code. 2. Stop overloading ipv6_prefer with the ability to disable IPv6 configuration. 3. Remove noafif() which was only ever called from ipv6_autoconfif. Instead, simplify and integrate the tests into that function, and convert the test to use is_wired_interface() instead of listing wireless interfaces explicitly. 4. Integrate backwards compatibility for ipv6_ifconfig_<interface> into _ifconfig_getargs. This dramatically simplifies the code in all of the callers, and avoids a lot of other code duplication. 5. In rc.d/netoptions, add code for an ipv6_privacy option to use RFC 4193 style pseudo-random addresses (this is what windows does by default, FYI). 6. Add support for the [NO]RTADV options in ifconfig_getargs() and ipv6_autoconfif(). In the latter, include support for the explicit addition of [-]accept_rtadv in ifconfig_<interface>_ipv6 as is done in the current code. 7. In rc.d/netif add a warning if $ipv6_enable is set, and remove the set_rcvar_obsolete for it. Also remove the latter from rc.d/ip6addrctl. 8. In /etc/defaults/rc.conf: Add an example for RTADV configuration. Set ipv6_network_interfaces to AUTO. Switch ipv6_prefer to YES. If ipv6_enable is not set this will have no effect. Add a default for ipv6_privacy (NO). 9. Document all of this in rc.conf.5.
Diffstat (limited to 'etc/defaults')
-rw-r--r--etc/defaults/rc.conf7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index dfdf08f..9151da4 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -210,6 +210,7 @@ cloned_interfaces="" # List of cloned network interfaces to create.
ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
#ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry.
+#ifconfig_ed0_ipv6="RTADV" # Sample IPv6 entry for RA/rtsol(8)
#ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" # Sample IPv6 addr entry
#ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" # Sample IPv6 alias
#ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0.
@@ -439,8 +440,9 @@ rfcomm_pppd_server_two_channel="3" # Override local channel for 'two'
icmp_bmcastecho="NO" # respond to broadcast ping packets
### IPv6 options: ###
-ipv6_network_interfaces="none" # List of IPv6 network interfaces
- # (or "auto" or "none").
+ipv6_network_interfaces="AUTO" # List of IPv6 network interfaces
+ipv6_prefer="YES" # Use IPv6 when both IPv4 and IPv6 can be used
+ipv6_privacy="NO" # Use privacy addresses with RTADV (RFC 4193)
ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO).
#ipv6_defaultrouter="2002:c058:6301::" # Use this for 6to4 (RFC 3068)
ipv6_static_routes="" # Set to static route list (or leave empty).
@@ -499,7 +501,6 @@ ipv6_ipfilter_rules="/etc/ipf6.rules" # rules definition file for ipfilter,
# for examples
ip6addrctl_enable="YES" # Set to YES to enable default address selection
ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages
-ipv6_prefer="NO" # Use IPv6 when both IPv4 and IPv6 can be used
##############################################################
### System console options #################################
OpenPOWER on IntegriCloud