conf/102502: ifconfig name does't rename netgraph node

Aleksey Shirokih a at olc.ru
Fri Aug 25 11:10:27 UTC 2006


>Number:         102502
>Category:       conf
>Synopsis:       ifconfig name does't rename netgraph node
>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 Aug 25 11:10:24 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Aleksey Shirokih
>Release:        6.1 RELENG updated now
>Organization:
OnlineCity
>Environment:
FreeBSD monstr.olc.ru 6.1-STABLE FreeBSD 6.1-STABLE #0: Fri Aug 25 12:33:45 NOVST 2006     root at monstr.olc.ru:/usr/obj/usr/src/sys/AP  i386
>Description:
ifconfig fxp0 name lan 
ifconfig lan 
lan: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
        ether 00:07:e9:2a:a5:a0
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active

ngctl list 
 Name: fxp0             Type: ether           ID: 00000001   Num hooks: 1

as we can see ifconfig does not renames netgraph node 
so if we start mpd pppoe on lan iface it wil not find any interface to work 

>How-To-Repeat:
please watch higher 
>Fix:
in /etc/network.subr add that litle patch 

# ifnet_rename
#       Rename all requested interfaces.
#
ifnet_rename()
{

        _ifn_list="`ifconfig -l`"
        [ -z "$_ifn_list" ] && return 0
        for _if in ${_ifn_list} ; do
                eval _ifname=\$ifconfig_${_if}_name
                if [ ! -z "$_ifname" ]; then
                        ifconfig $_if name $_ifname
                        #olc patch 
                        /usr/sbin/ngctl name $_if: $_ifname
                fi
        done
        return 0
}

in c code i not well enougth so no fix avalaible
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list