From nobody@FreeBSD.org  Fri Aug 25 11:05:03 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8E59916A4DD
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Aug 2006 11:05:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5062043D53
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Aug 2006 11:05:03 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k7PB52BS057849
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Aug 2006 11:05:02 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k7PB52ns057847;
	Fri, 25 Aug 2006 11:05:02 GMT
	(envelope-from nobody)
Message-Id: <200608251105.k7PB52ns057847@www.freebsd.org>
Date: Fri, 25 Aug 2006 11:05:02 GMT
From: Aleksey Shirokih <a@olc.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ifconfig name does't rename netgraph node
X-Send-Pr-Version: www-2.3

>Number:         102502
>Category:       conf
>Synopsis:       [netgraph] [patch] ifconfig name does't rename netgraph node in network.subr
>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 Aug 25 11:10:24 GMT 2006
>Closed-Date:    
>Last-Modified:  Thu Mar 19 04:23:28 UTC 2009
>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@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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Aug 25 23:06:19 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102502 

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Aleksey Shirokih <a@olc.ru>
Cc: Gleb Smirnoff <glebius@FreeBSD.org>, bug-followup@FreeBSD.org
Subject: Re: conf/102502: ifconfig name does't rename netgraph node
Date: Sat, 26 Aug 2006 18:26:25 +0400

 On Fri, Aug 25, 2006 at 11:05:02AM +0000, Aleksey Shirokih wrote:
 > 
 > >Number:         102502
 > >Category:       conf
 > >Synopsis:       ifconfig name does't rename netgraph node
 > 
 ng_ether(4) creates all nodes when it's loaded, or when a new
 interface is attached, and it *attempts* to name a node with
 its interface's name.  This is not guaranteed though.
 
 If you need to rename interfaces, you can load ng_ether module
 *after* doing the renames.  It's not ideal, e.g., it'll still
 require manual intervention if a new interface is plugged, but
 I don't think that automatic renaming of nodes should happen,
 unconditionally.
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru@FreeBSD.org
 FreeBSD committer

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: Aleksey Shirokih <a@olc.ru>, bug-followup@FreeBSD.org
Subject: Re: conf/102502: ifconfig name does't rename netgraph node
Date: Mon, 28 Aug 2006 13:28:18 +0400

 On Sat, Aug 26, 2006 at 06:26:25PM +0400, Ruslan Ermilov wrote:
 R> > >Number:         102502
 R> > >Category:       conf
 R> > >Synopsis:       ifconfig name does't rename netgraph node
 R> > 
 R> ng_ether(4) creates all nodes when it's loaded, or when a new
 R> interface is attached, and it *attempts* to name a node with
 R> its interface's name.  This is not guaranteed though.
 R> 
 R> If you need to rename interfaces, you can load ng_ether module
 R> *after* doing the renames.  It's not ideal, e.g., it'll still
 R> require manual intervention if a new interface is plugged, but
 R> I don't think that automatic renaming of nodes should happen,
 R> unconditionally.
 
 I doubt that the problem shouldn't be fixed.
 
 And this is a duplicate of kern/92270.
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
Responsible-Changed-From-To: freebsd-rc->freebsd-net 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Mon Aug 28 12:49:02 UTC 2006 
Responsible-Changed-Why:  
While the proposed workaround is in network.subr, it's not committable 
and the real issue is in the kernel. 

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