From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 25 11:10:27 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA9A816A4E2 for ; Fri, 25 Aug 2006 11:10:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 389C543D4C for ; Fri, 25 Aug 2006 11:10:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7PBARLp087253 for ; Fri, 25 Aug 2006 11:10:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7PBAR2F087252; Fri, 25 Aug 2006 11:10:27 GMT (envelope-from gnats) Resent-Date: Fri, 25 Aug 2006 11:10:27 GMT Resent-Message-Id: <200608251110.k7PBAR2F087252@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Aleksey Shirokih Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E59916A4DD for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: conf/102502: ifconfig name does't rename netgraph node X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2006 11:10:27 -0000 >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@monstr.olc.ru:/usr/obj/usr/src/sys/AP i386 >Description: ifconfig fxp0 name lan ifconfig lan lan: flags=8843 mtu 1500 options=b inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:07:e9:2a:a5:a0 media: Ethernet autoselect (100baseTX ) 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: