From owner-freebsd-stable@FreeBSD.ORG Mon Dec 12 18:58:32 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 AC06A1065672; Mon, 12 Dec 2011 18:58:32 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 449998FC13; Mon, 12 Dec 2011 18:58:32 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBCIwUgW066143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 12 Dec 2011 19:58:31 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1323716311; bh=qLZDzTRa//EkXZVdrYBPjXXggU3M3PM21doSSE2Dvs8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=o+UDh4JkTd8vOvoA9ZUP7xXJVZqVw/Qmy1VHsyrYpgyPa/Hm8BFwuN9wtL/LM8a62 YTt52olCmHoBzQIVgeRwwDDfhX75DeRH+0JfNWYJgcwQELgcD2CX6xZ2iNrGb1+sdF ccYyviuP5I0NPGpEFaj38AQeI0rqUfxwb1WZsNR8= Date: Mon, 12 Dec 2011 19:58:30 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Dimitry Andric Message-ID: <20111212185830.GL83814@acme.spoerlein.net> Mail-Followup-To: Dimitry Andric , stable@freebsd.org References: <20111211223327.GJ83814@acme.spoerlein.net> <4EE53431.1040609@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4EE53431.1040609@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: stable@freebsd.org 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: Mon, 12 Dec 2011 18:58:32 -0000 On Sun, 2011-12-11 at 23:52:33 +0100, Dimitry Andric wrote: > On 2011-12-11 23:33, Ulrich Spörlein 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. > > > > This trips up my setup, where a bunch of hosts (some behind NAT) can all > > talk to each other over their IPv6 addresses (some are tunneled), but > > cannot do so via IPv4. > > > > 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={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? Well, I had ipv6_enable set from the stable/8 days. The warnings and the code make me believe it should behave as if ipv6_activate_all_interfaces was set, somehow that's not the case, though. I've now set ip6addrctl_policy and everything is back working again. Thanks! Uli