Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Jun 2017 13:08:15 +0200
From:      Harry Schmalzbauer <freebsd@omnilan.de>
To:        freebsd-stable@freebsd.org
Subject:   ifconfig(4) name and tap(4)'s character special device name
Message-ID:  <5931471F.4090703@omnilan.de>

next in thread | raw e-mail | index | archive | help
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5931471F.4090703>