/etc/rc.d/ip6addrctl

J.R. Oldroyd fbsd at opal.com
Tue Jan 8 21:02:48 UTC 2013


On Tue, 8 Jan 2013 19:46:09 +0100 Ulrich Spörlein <uqs at freebsd.org>
wrote:

> Turns out it was the missing setting of
> ip6addrctl_policy="ipv6_prefer" in rc.conf that also bit me in
> strange and mysterious ways on another machine where I did the
> upgrade. It's very unfortunate that this will runtime-break sendmail
> and I honestly don't know why we make ipv4 the default in this day
> and age.
> 
> Can some IPv6 guru chime in here? This is all thoroughly confusing.
> 
> Thanks!
> Uli
> 

This bit me too, although with something other than sendmail.

It's /etc/rc.d/ip6addrctl that sets the preference for IPv6 or IPv4.  I
think the logic is a bit confusing here, or at least isn't consistent
with what the documentation for these settings (in rc.conf(5)) suggests.

In the startup script, IPv6 is preferred if:
	either:	ip6addrctl_policy is set to "ipv6_prefer"
	or:	ip6addrctl_policy is set to "auto", you've not
		specified your own policy config file and
		ipv6_activate_all_interfaces is set to true

In the documentation, it implies that using ipv6_activate_all_interfaces
is probably not needed for most users:
	Note that it is not always necessary to set this variable to
	“YES” to use IPv6 functionality on FreeBSD.  In most cases,
	just configuring ifconfig_⟨interface⟩_ipv6 variables works.

Seems to me that the ip6addrctl script should also prefer IPv6 if any
interface has IPv6 enabled using one of the ifconfig_(interface)_ipv6
variables.

	-jr


More information about the freebsd-stable mailing list