From yar@comp.chem.msu.su  Tue Nov 28 10:32:52 2006
Return-Path: <yar@comp.chem.msu.su>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4082D16A494
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 28 Nov 2006 10:32:52 +0000 (UTC)
	(envelope-from yar@comp.chem.msu.su)
Received: from jujik.ramtel.ru (jujik.ramtel.ru [81.19.64.112])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6BDC543CC7
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 28 Nov 2006 10:32:33 +0000 (GMT)
	(envelope-from yar@comp.chem.msu.su)
Received: from jujik.ramtel.ru (localhost [127.0.0.1])
	by jujik.ramtel.ru (8.13.8/8.13.8) with ESMTP id kASAWFsf086329
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 28 Nov 2006 13:32:15 +0300 (MSK)
	(envelope-from yar@comp.chem.msu.su)
Received: (from yar@localhost)
	by jujik.ramtel.ru (8.13.8/8.13.8/Submit) id kASAWEVN086328;
	Tue, 28 Nov 2006 13:32:14 +0300 (MSK)
	(envelope-from yar@comp.chem.msu.su)
Message-Id: <200611281032.kASAWEVN086328@jujik.ramtel.ru>
Date: Tue, 28 Nov 2006 13:32:14 +0300 (MSK)
From: Yar Tikhiy <yar@comp.chem.msu.su>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Address can disappear from network interface
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         105945
>Category:       kern
>Synopsis:       Address can disappear from network interface
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 28 10:40:12 GMT 2006
>Closed-Date:    
>Last-Modified:  Wed Jan 14 22:27:58 UTC 2009
>Originator:     Yar Tikhiy
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
none
>Environment:

	CURRENT and 6-STABLE

>Description:
	
	If a cloned interface is destroyed, recreated, and assigned
	an address without a delay, the address will disappear in
	a moment.  Moreover, a delay not longer than 0.1 sec between
	destruction and recreation doesn't seem to affect the issue.

>How-To-Repeat:

dg6# cat lo.sh
ifconfig lo5 destroy
ifconfig lo5 create 127.1.1.$1/24 mtu ${1}00
ifconfig lo5
echo almost there...
echo
sleep 1
ifconfig lo5
echo

dg6# sh lo.sh 100
ifconfig: interface lo5 does not exist
lo5: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 10000
        inet 127.1.1.100 netmask 0xffffff00
almost there...

lo5: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 10000
        inet 127.1.1.100 netmask 0xffffff00

dg6# sh lo.sh 101
lo5: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 10100
        inet 127.1.1.101 netmask 0xffffff00
almost there...

lo5: flags=8048<LOOPBACK,RUNNING,MULTICAST> mtu 10100

dg6# sh lo.sh 102
lo5: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 10200
        inet 127.1.1.102 netmask 0xffffff00
almost there...

lo5: flags=8048<LOOPBACK,RUNNING,MULTICAST> mtu 10200

dg6#


As the cookie stored in mtu shows, we are not setting parameters
on the dying instance of the interface -- IP just disappears from
the new instance.
>Fix:
>Release-Note:
>Audit-Trail:

From: Bruce M Simpson <bms@incunabulum.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/105945: Address can disappear from network interface
Date: Wed, 07 Feb 2007 04:04:45 +0000

 I can reproduce these results as provided by Yar on -CURRENT from 3rd 
 February 2007.
 
 the ifconfig parser grammar will allow this behaviour.
 it screams race condition -- this would allow ifconfig to set the 
 address on what appears to be the dying clone.

Date: Sun, 03 Aug 2008 13:35:46 +0400
From: KES <kes-kes@yandex.ru>
To: bug-followup@freebsd.org

 When I start routed address disappears from rl0 interface (2:28:19)
 When I kill routed and start it again address returns to system(2:28:40)
 When I kill routed and start it again address disappears from rl0 interface
 This is log file of routed:
 
 kes# cat routed.log
 -- 02:28:19 --
 Tracing actions started
 Add interface rl0  10.0.16.1      -->10.0.0.0/16     metric=4 <RIPV2>
 RCVBUF=61440
 turn on RIP
 Add interface rl2  10.10.16.1     -->10.10.16.0/24   <RIPV2>
 Add interface rl4  10.11.16.3     -->10.11.16.0/28   <RIPV2>
 Add interface lo0  127.0.0.1      -->127.0.0.1/32    <LOOPBACK> <PASSIVE>
 Add interface tun0 92.113.11.189  -->195.5.5.202/32  <PT-TO-PT> <PASSIVE|BCAST_RDISC>
 Add interface ng0  10.11.16.3     -->192.168.9.2/32  <PT-TO-PT> <PASSIVE|BCAST_RDISC>
 start supplying routes
 Add    192.168.9.2/32  -->10.11.16.3       metric=0  ng0 <IF>
 Add    10.11.16.3/32   -->127.0.0.1        metric=0  ng0 <IF|LOCAL>
 Add    195.5.5.202/32  -->92.113.11.189    metric=0  tun0 <IF>
 Add    92.113.11.189/32-->127.0.0.1        metric=0  tun0 <IF|LOCAL>
 Add    127.0.0.1/32    -->127.0.0.1        metric=0  lo0 <IF>
 Add    10.11.16.0/28   -->10.11.16.3       metric=0  rl4 <IF>
 Add    10.10.16.0/24   -->10.10.16.1       metric=0  rl2 <IF>
 Add    10.0.0.0/16     -->10.0.16.1        metric=4  rl0 <IF>
 -- 02:28:19 --
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 -- 02:28:20 --
 ignore ARP RTM_ADD from pid 0: 10.10.16.214/32
 -- 02:28:21 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:21 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:21 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:22 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:23 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:23 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:24 --
 ignore ARP RTM_ADD from pid 0: 10.10.16.214/32
 -- 02:28:24 --
 ignore RTM_MISS: 10.0.16.1
 ignore cloned RTM_ADD from pid 0: 10.0.16.3/32
 -- 02:28:24 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:24 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:25 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:26 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:27 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:27 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:28 --
 ignore ARP RTM_ADD from pid 0: 10.10.16.214/32
 -- 02:28:28 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:28 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:29 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:30 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:30 --
 send all routes and inhibit dynamic updates for 2.978 sec
 exiting with signal 15
 
 -- 02:28:40 --
 Tracing actions started
 Add interface rl0  10.0.16.1      -->10.0.0.0/16     metric=4 <RIPV2>
 RCVBUF=61440
 turn on RIP
 Add interface rl2  10.10.16.1     -->10.10.16.0/24   <RIPV2>
 Add interface rl4  10.11.16.3     -->10.11.16.0/28   <RIPV2>
 Add interface lo0  127.0.0.1      -->127.0.0.1/32    <LOOPBACK> <PASSIVE>
 Add interface tun0 92.113.11.189  -->195.5.5.202/32  <PT-TO-PT> <PASSIVE|BCAST_RDISC>
 Add interface ng0  10.11.16.3     -->192.168.9.2/32  <PT-TO-PT> <PASSIVE|BCAST_RDISC>
 start supplying routes
 Add    192.168.9.2/32  -->10.11.16.3       metric=0  ng0 <IF>
 Add    10.11.16.3/32   -->127.0.0.1        metric=0  ng0 <IF|LOCAL>
 Add    195.5.5.202/32  -->92.113.11.189    metric=0  tun0 <IF>
 Add    92.113.11.189/32-->127.0.0.1        metric=0  tun0 <IF|LOCAL>
 Add    127.0.0.1/32    -->127.0.0.1        metric=0  lo0 <IF>
 Add    10.11.16.0/28   -->10.11.16.3       metric=0  rl4 <IF>
 Add    10.10.16.0/24   -->10.10.16.1       metric=0  rl2 <IF>
 Add    10.0.0.0/16     -->10.0.16.1        metric=4  rl0 <IF>
 -- 02:28:40 --
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 ignore RTM_NEWMADDR for AF 0
 -- 02:28:40 --
 ignore ARP RTM_ADD from pid 0: 10.10.16.214/32
 -- 02:28:40 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:40 --
 Add    10.11.16.0/24   -->10.0.16.3        metric=5  rl0 02:28:40
 -- 02:28:40 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:41 --
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:41 --
 ignore RTM_MISS: 10.0.16.1
 ignore RTM_MISS: 10.0.16.1
 -- 02:28:42 --
 ignore ARP RTM_ADD from pid 0: 10.0.16.1/32
 -- 02:28:43 --
 ignore ARP RTM_ADD from pid 0: 10.10.16.214/32
 -- 02:28:44 --
 ignore ARP RTM_ADD from pid 0: 10.0.16.3/32
 -- 02:28:45 --
 send all routes and inhibit dynamic updates for 3.145 sec
 -- 02:28:52 --
 send all routes and inhibit dynamic updates for 4.112 sec
 exiting with signal 15
 
 if need any other logs. ask me and I will send
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Wed Jan 14 22:27:47 UTC 2009 
Responsible-Changed-Why:  

Over to maintainer(s). 

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