Getting /dev entry by interface name

Stefan Blachmann sblachmann at gmail.com
Sat Apr 7 08:39:56 UTC 2018


Does FreeBSD have anything comparable to the udev rules which are
available on the systemd-ized Linuces?
Afaiu such could achieve what the OP intended.

On 4/7/18, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> --------
> In message <20180407025807.GA18883 at 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 at 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.
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>


More information about the freebsd-hackers mailing list