From owner-freebsd-stable@FreeBSD.ORG Sun Dec 11 22:52:41 2011 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F881106564A for ; Sun, 11 Dec 2011 22:52:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id E6B178FC13 for ; Sun, 11 Dec 2011 22:52:40 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:619e:d461:e78e:1ac9] (unknown [IPv6:2001:7b8:3a7:0:619e:d461:e78e:1ac9]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1DED15C37 for ; Sun, 11 Dec 2011 23:52:38 +0100 (CET) Message-ID: <4EE53431.1040609@FreeBSD.org> Date: Sun, 11 Dec 2011 23:52:33 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111130 Thunderbird/9.0 MIME-Version: 1.0 To: stable@freebsd.org References: <20111211223327.GJ83814@acme.spoerlein.net> In-Reply-To: <20111211223327.GJ83814@acme.spoerlein.net> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: stable/9 preferring IPv4 over IPv6, what changed? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2011 22:52:41 -0000 On 2011-12-11 23:33, Ulrich Sp=F6rlein wrote: > long story short: telnet foo on stable/8 will first try connecting via > IPv6, then via IPv4 (foo has A and AAAA records). On stable/9 it's the > other way round. >=20 > This trips up my setup, where a bunch of hosts (some behind NAT) can al= l > talk to each other over their IPv6 addresses (some are tunneled), but > cannot do so via IPv4. >=20 > Is this due to changes in bind or the resolver? Most likely due to changes in the IPv6 startup scripts and rc.conf settings. The behaviour seems to be determined by multiple settings in rc.conf, first of all: ip6addrctl_policy=3D{ipv4_prefer|ipv6_prefer|AUTO} where the default value is AUTO. Values of ipv4_prefer and ipv6_prefer do what you expect them to. In case of AUTO, and if you don't have /etc/ip6addrctl.conf with explicit settings, /etc/rc.d/ip6addrctl checks the value of ipv6_activate_all_interfaces. If it is YES, IPv6 is preferred, if it is NO or unset, IPv4 is preferred. What are your IPv6-related settings in rc.conf?