From nobody@FreeBSD.org  Wed Aug 17 20:25:59 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 83764106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Aug 2011 20:25:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 744418FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Aug 2011 20:25:59 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7HKPxDJ095581
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Aug 2011 20:25:59 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p7HKPxCX095580;
	Wed, 17 Aug 2011 20:25:59 GMT
	(envelope-from nobody)
Message-Id: <201108172025.p7HKPxCX095580@red.freebsd.org>
Date: Wed, 17 Aug 2011 20:25:59 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: routing_stop_inet6() logic doesn't handle ipv6_network_interfaces properly
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         159846
>Category:       conf
>Synopsis:       [rc.conf] routing_stop_inet6() logic doesn't handle ipv6_network_interfaces properly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-rc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 17 20:30:09 UTC 2011
>Closed-Date:    
>Last-Modified:  Sun Feb 03 22:29:15 UTC 2013
>Originator:     Garrett Cooper
>Release:        9.0-BETA1
>Organization:
iXsystems Inc
>Environment:
FreeBSD akai-ntbk.local 9.0-BETA1 FreeBSD 9.0-BETA1 #0 r224653M: Fri Aug 12 04:49:31 PDT 2011     root@:/usr/obj/usr/src/sys/NETBOOK_NOSMP  i386
>Description:
As stated in /etc/defaults/rc.conf...

### IPv6 options: ###
ipv6_network_interfaces="auto"  # List of IPv6 network interfaces
                                # (or "auto" or "none").

So, the only accepted values are auto and none.

This doesn't make sense though when used in routing_stop_inet6 though:

routing_stop_inet6()
{
        local i

        route -n flush -inet6
        for i in ${ipv6_network_interfaces}; do
               ifconfig $i inet6 -defaultif
        done
}

Currently it's cosmetic noise, for the most part, but this also doesn't remove the default interface value either properly.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Aug 17 21:26:54 UTC 2011 
Responsible-Changed-Why:  
Perhaps the users on this list can comment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159846 

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@FreeBSD.org, yanegomi@gmail.com
Cc:  
Subject: Re: conf/159846: rc.conf routing_stop_inet6 logic doesn t handle
 ipv6_network_interfaces properly
Date: Sun, 2 Dec 2012 23:41:37 -0800 (PST)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
 
 --967339439-1538670288-1354520501=:40941
 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
 
  	This patch fixes the problem.
 Thanks,
 -Garrett
 --967339439-1538670288-1354520501=:40941
 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=rc.d-routing-should-translate-ipv6-interfaces-properly.patch.txt
 Content-Transfer-Encoding: BASE64
 Content-ID: <alpine.BSF.2.00.1212022341370.40941@toaster.local>
 Content-Description: 
 Content-Disposition: attachment; filename=rc.d-routing-should-translate-ipv6-interfaces-properly.patch.txt
 
 SW5kZXg6IGV0Yy9yYy5kL3JvdXRpbmcNCj09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT0NCi0tLSBldGMvcmMuZC9yb3V0aW5nCShyZXZpc2lvbiAyNDM4MDIpDQor
 KysgZXRjL3JjLmQvcm91dGluZwkod29ya2luZyBjb3B5KQ0KQEAgLTE3NSw2
 ICsxNzUsOSBAQA0KIAlbTm5dW09vXVtObl1bRWVdKQ0KIAkJaXB2Nl9uZXR3
 b3JrX2ludGVyZmFjZXM9JycNCiAJCTs7DQorCVtBYV1bVXVdW1R1XVtPb10p
 DQorCQlpcHY2X25ldHdvcmtfaW50ZXJmYWNlcz1gbGlzdF9uZXRfaW50ZXJm
 YWNlc2ANCisJCTs7DQogCWVzYWMNCiANCiAJaWYgY2hlY2t5ZXNubyBpcHY2
 X2dhdGV3YXlfZW5hYmxlOyB0aGVuDQo=
 
 --967339439-1538670288-1354520501=:40941--
>Unformatted:
