From nobody@FreeBSD.org  Fri Mar 28 16:09:28 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id D1B27A24
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Mar 2014 16:09:28 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id BD62EE74
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Mar 2014 16:09:28 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SG9SUP049668
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Mar 2014 16:09:28 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2SG9SEF049667;
	Fri, 28 Mar 2014 16:09:28 GMT
	(envelope-from nobody)
Message-Id: <201403281609.s2SG9SEF049667@cgiserv.freebsd.org>
Date: Fri, 28 Mar 2014 16:09:28 GMT
From: Darren Baginski <kickbsd@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: IPv6 on lo never leaves 'tentative' state if configured with prefixlen 128
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         188032
>Category:       kern
>Synopsis:       [lo] IPv6 on lo never leaves 'tentative' state if configured with prefixlen 128
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 28 16:10:02 UTC 2014
>Closed-Date:    
>Last-Modified:  Wed Apr 16 01:27:45 UTC 2014
>Originator:     Darren Baginski
>Release:        10.0-STABLE FreeBSD
>Organization:
>Environment:
FreeBSD freebsd10.local 10.0-STABLE FreeBSD 10.0-STABLE #1 r262603: Fri Feb 28 16:39:10 UTC 2014     root@freebsd10.local:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
IPv6 on lo never leaves 'tentative' state if configured with prefixlen 128.

Steps to reproduce.

# ifconfig lo8 create
# ifconfig lo8 up
# ifconfig lo8 inet6 fc00::ff prefixlen 128


# ifconfig lo8
lo8: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 fc00::ff prefixlen 128 tentative 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


lo8 ipv6 stays 'tentative' stays forever and never become ping-able.

"Workaround" is to apply any other prefixlen, e.g. /127 
>How-To-Repeat:

# ifconfig lo8 create
# ifconfig lo8 up
# ifconfig lo8 inet6 fc00::ff prefixlen 128


# ifconfig lo8
lo8: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 fc00::ff prefixlen 128 tentative 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

# ping fc00::ff
>Fix:
"Workaround" is to apply any other prefixlen, e.g. /127 

>Release-Note:
>Audit-Trail:

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Darren Baginski <kickbsd@yandex.ru>, 
 freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/188032: IPv6 on lo never leaves 'tentative' state if configured
 with prefixlen 128
Date: Mon, 31 Mar 2014 12:11:14 +0400

 Hello,
 
 Actually the problem is in your configuration. As you may see, you have
 IFDISABLED flag set. When you are configuring /127 prefix, the system
 does install route on that prefix and automatically clears IFDISABLED
 flag. When you are configuring /128 prefix, the system won't install
 route and thus IFDISABLED flag still here. With IFDISABLED flag the
 system won't do DAD and  tentative flag will never cleared.
 
 -- 
 WBR, Andrey V. Elsukov

From: Darren Baginski <kickbsd@yandex.ru>
To: Andrey V. Elsukov <bu7cher@yandex.ru>,
	"freebsd-gnats-submit@FreeBSD.org" <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: kern/188032: IPv6 on lo never leaves 'tentative' state if configured with prefixlen 128
Date: Thu, 03 Apr 2014 05:08:45 +0400

 I'm not setting IFDISABLED flag as you see from output below.
 Moreover the same set of commands doesn't dot put interface into IFDISABLED sate on FreeBSD 7.x, 8.x, 9.x
 Again, if I set IPv4 /32 it works as well. 
 Thus this /128 case is a clear regression.

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Darren Baginski <kickbsd@yandex.ru>, 
 "freebsd-gnats-submit@FreeBSD.org" <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: kern/188032: IPv6 on lo never leaves 'tentative' state if configured
 with prefixlen 128
Date: Thu, 03 Apr 2014 12:46:55 +0400

 All interfaces have IFDISABLED flag if you have not configured IPv6 for
 them.
 
 -- 
 WBR, Andrey V. Elsukov

From: Darren Baginski <kickbsd@yandex.ru>
To: Andrey V. Elsukov <bu7cher@yandex.ru>,
	"freebsd-gnats-submit@FreeBSD.org" <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: kern/188032: IPv6 on lo never leaves 'tentative' state if configured with prefixlen 128
Date: Fri, 04 Apr 2014 21:18:23 +0400

 I do configure IPv6, output clearly says that, and more specifically I configure it with /128.
 Let me show again again:
 
 case A, getting 'tentative'
 # ifconfig lo8 create
 # ifconfig lo8 up
 # ifconfig lo8 inet6 fc00::ff prefixlen 128               <- configuring IPv6 address with /128 prefix
 
 case B, all good, NO 'tentative'
 # ifconfig lo8 create
 # ifconfig lo8 up
 # ifconfig lo8 inet6 fc00::ff prefixlen 127              <- configuring IPv6 address with /127 prefix
 
 On FreeBSD 7.x, 8.x, 9.x case A works, while on 10.x interface is stuck in `tentative` permanently.

From: "Andrey V. Elsukov" <ae@FreeBSD.org>
To: Darren Baginski <kickbsd@yandex.ru>, 
 "freebsd-gnats-submit@FreeBSD.org" <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: kern/188032: IPv6 on lo never leaves 'tentative' state if configured
 with prefixlen 128
Date: Fri, 04 Apr 2014 21:25:47 +0400

 I described why this works as you see in the first message.
 There are number of configuration variables related to IPv6
 configuration. I.e. ipv6_enable, ipv6_activate_all_interfaces,
 ifconfig_xxx_ipv6. These variables controls behavior of the system
 when new interface will appears. You can read /etc/network.subr and you
 will see that presence of IFDISABLED flag depends from these variables.
 
 -- 
 WBR, Andrey V. Elsukov

From: Darren Baginski <kickbsd@yandex.ru>
To: "freebsd-gnats-submit@FreeBSD.org" <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: kern/188032: IPv6 on lo never leaves 'tentative' state if configured with prefixlen 128
Date: Thu, 10 Apr 2014 20:35:09 +0400

 Basically behavior is is like that
 
 /128 mask:
 ipv6_activate_all_interfaces="YES" && /128  -> OK
 NO ipv6_activate_all_interfaces && /128  -> *tentative*
 
 /127 mask:
 ipv6_activate_all_interfaces="YES" && /127  -> OK
 NO ipv6_activate_all_interfaces && /127  -> *OK*
 
 I find that behavior is inconsistent, mask of /128 has no any magic meaning.
 
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Apr 16 01:26:32 UTC 2014 
Responsible-Changed-Why:  
assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188032 
>Unformatted:
