From owner-freebsd-stable@FreeBSD.ORG Tue Jan 8 21:32:37 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C8E7CE7D for ; Tue, 8 Jan 2013 21:32:37 +0000 (UTC) (envelope-from fbsd@opal.com) Received: from mho-02-ewr.mailhop.org (mho-04-ewr.mailhop.org [204.13.248.74]) by mx1.freebsd.org (Postfix) with ESMTP id 6775CCF5 for ; Tue, 8 Jan 2013 21:32:36 +0000 (UTC) Received: from pool-151-203-201-84.bos.east.verizon.net ([151.203.201.84] helo=homobox.opal.com) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Tsgmi-0006LS-9C for freebsd-stable@freebsd.org; Tue, 08 Jan 2013 21:32:36 +0000 Received: from shibato (shibato.opal.com [IPv6:2001:470:8cb8:4:221:63ff:fe5a:c9a7]) (authenticated bits=0) by homobox.opal.com (8.14.4/8.14.4) with ESMTP id r08LWW0S083059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 8 Jan 2013 16:32:32 -0500 (EST) (envelope-from fbsd@opal.com) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 151.203.201.84 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18qRQ/ifQtiMPmED8bmbAoX Date: Tue, 8 Jan 2013 16:32:31 -0500 From: "J.R. Oldroyd" To: freebsd-stable@freebsd.org Subject: Re: /etc/rc.d/ip6addrctl Message-ID: <20130108163231.124890ab@shibato> In-Reply-To: <20130108160243.74a93ab8@shibato> References: <20130108151837.GF35868@acme.spoerlein.net> <20130108180920.GJ36633@rugsucker.smi.sendmail.com> <20130108184609.GJ35868@acme.spoerlein.net> <20130108160243.74a93ab8@shibato> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/gi4pbmtXP7y7TH987IJRQp2" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (homobox.opal.com [IPv6:2001:470:8cb8:4::1]); Tue, 08 Jan 2013 16:32:32 -0500 (EST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on homobox.opal.com X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2013 21:32:37 -0000 --MP_/gi4pbmtXP7y7TH987IJRQp2 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, 8 Jan 2013 16:02:43 -0500 "J.R. Oldroyd" wrote: > 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 > A simple change along the lines of the attached patch, which also prefers IPv6 if any i/f uses IPv6 autoconfig, will accomplish this. -jr --MP_/gi4pbmtXP7y7TH987IJRQp2 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=ip6addrctl.diff --- ip6addrctl.orig 2013-01-04 00:07:03.000000000 -0500 +++ ip6addrctl 2013-01-08 16:28:53.000000000 -0500 @@ -62,7 +62,8 @@ ip6addrctl install "${config_file}" checkyesno ip6addrctl_verbose && ip6addrctl else - if checkyesno ipv6_activate_all_interfaces; then + ipv6auto=`list_net_interfaces autoconf` + if [ -n "$ipv6auto" ] || checkyesno ipv6_activate_all_interfaces; then ip6addrctl_prefer_ipv6 else ip6addrctl_prefer_ipv4 --MP_/gi4pbmtXP7y7TH987IJRQp2--