From owner-freebsd-stable@freebsd.org Fri Jun 2 11:08:20 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78C70BF53B5 for ; Fri, 2 Jun 2017 11:08:20 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17D0383E94 for ; Fri, 2 Jun 2017 11:08:19 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id v52B8G9H095338 for ; Fri, 2 Jun 2017 13:08:16 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (titan.inop.mo1.omnilan.net [IPv6:2001:a60:f0bb:1::3:1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 3FBCE1EC; Fri, 2 Jun 2017 13:08:16 +0200 (CEST) Message-ID: <5931471F.4090703@omnilan.de> Date: Fri, 02 Jun 2017 13:08:15 +0200 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: ifconfig(4) name and tap(4)'s character special device name Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Fri, 02 Jun 2017 13:08:16 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 11:08:20 -0000 Hello, renaming vmnet/tap(4) interfaces, defined in rc.conf(5) via "cloned_interfaces" e.g, isn't prohibited by rc(8)-network.subr nor by ifconfig(8). If such a interface is renamed, the Ethernet device shows up correctly, with the new name and ifconfig(8) also reports the new name if it's created and renamed in the same invocation. Problem is, the control device isn't renamed, it will keep it's initial creation name like tap0 and I found no userland way to determine the corresponding Ethernet IF name. Several solutions come to my mind: – Prohibit renaming of Ethernet-group tap (and tun?) interface types. – Extend ifconfig(8) to alter the character special device name. Either rename or create symlink? – Let rc(8)-network.subr alter character special device name. Either rename or create symlink? Has anybody else thought about that problem? The last mentioned possibility of course wouldn't cover manual CLI renaming, so most likely isn't feasable. Otoh, there's some magic I haven't discovered yet: Defining ifconfig_bridge0_name="br0" in rc.conf(5), but _not_ listing bridge0 in cloned_interfaces, leads to run-time auto-renaming as soon as I manually invoke 'ifconfig bridge0 create' (result is ifconfig(8) lists br0, although I haven't invoked 'ifconfig bridge0 name br0')! Haven't found any traces in devd.conf(5) and haven't really inspected rc(8)-network.subr careful enough to know why/how that happens! But maybe this method could also be utilized to handle the vmnet/tap-character-special-device renaming? -harry