From nobody@FreeBSD.org  Fri Jul  8 12:37:46 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 017A41065672
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Jul 2011 12:37:46 +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 CCBEF8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Jul 2011 12:37:45 +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 p68CbjK9075084
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 8 Jul 2011 12:37:45 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p68Cbj6g075083;
	Fri, 8 Jul 2011 12:37:45 GMT
	(envelope-from nobody)
Message-Id: <201107081237.p68Cbj6g075083@red.freebsd.org>
Date: Fri, 8 Jul 2011 12:37:45 GMT
From: Antonio Huete <ahuete.devel@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: netif stop don't destroy cloned_interfaces
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         158734
>Category:       conf
>Synopsis:       netif stop don't destroy cloned_interfaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 08 12:40:03 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Jul 11 03:35:19 UTC 2011
>Originator:     Antonio Huete
>Release:        8.2-RELEASE
>Organization:
>Environment:
FreeBSD fbsd.localdomain 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Hi,

I'm not sure if this is a bug or it is intentional, but when you try to
restart netif service, it spits an error because cloned_interfaces are
not destroyed upon netif stop.

fbsd# grep cloned /etc/rc.conf
cloned_interfaces="bridge0"


fbsd# /etc/rc.d/netif restart
Stopping Network: lo0 em0 plip0 bridge0.
lo0: flags=8048<LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:0c:29:69:54:73
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
bridge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 3a:51:06:6b:4d:87
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0
ifconfig: create: bad value
Starting Network: lo0 em0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:0c:29:69:54:73
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active


It spits "ifconfig: create: bad value" because in /etc/network.subr in
clone_up function line 502, it tries to create the clone without checking
if it exist first. I wonder also if it would be fine just to send stderr
to /dev/null or if it would be worthy to create a function to check the
existence of the clone and skip its creation in that case.

Cheers,
Antonio Huete
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Antonio Huete Jimenez <ahuete.devel@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org, freebsd-i386@freebsd.org
Cc:  
Subject: Re: i386/158734: netif stop don't destroy cloned_interfaces
Date: Fri, 8 Jul 2011 14:53:48 +0200

 --0016363b8bae21d59c04a78e53c7
 Content-Type: text/plain; charset=ISO-8859-1
 
 This is the same as for PR 109980, although it contains additional
 information.
 I can see that 109980 was assigned to freebsd-rc but no response was given.
 
 --0016363b8bae21d59c04a78e53c7--
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jul 11 03:34:01 UTC 2011 
Responsible-Changed-Why:  
reclassify. 

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