i386/158734: netif stop don't destroy cloned_interfaces

Antonio Huete ahuete.devel at gmail.com
Fri Jul 8 12:40:04 UTC 2011


>Number:         158734
>Category:       i386
>Synopsis:       netif stop don't destroy cloned_interfaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>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:
>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 at 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:
>Unformatted:


More information about the freebsd-i386 mailing list