Date: Sat, 07 Apr 2018 08:17:29 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Roman Bogorodskiy <novel@FreeBSD.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Getting /dev entry by interface name Message-ID: <37078.1523089049@critter.freebsd.dk> In-Reply-To: <20180407025807.GA18883@kloomba> References: <20180407025807.GA18883@kloomba>
next in thread | previous in thread | raw e-mail | index | archive | help
-------- In message <20180407025807.GA18883@kloomba>, Roman Bogorodskiy writes: >1. Create tap(4) like that: > ># ifconfig tap create >tap2 ># > >2. Rename it > ># ifconfig tap2 name testif >testif > >Now I can do 'ifconfig testif' and there'll be no signs that it was >named 'tap2' previously, however, in /dev it's still /dev/tap2. I would argue that is an error. The /dev entry should also be renamed, or maybe better, a symlink with the new name should be created, pointing to the /dev/tap%d entry. However, I dont know if that is actually possible, is the device driver even even told about the new interface name ? There is also a name-space validation issue to think about: ifconfig tap2 name ../etc -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37078.1523089049>