Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2018 10:39:54 +0200
From:      Stefan Blachmann <sblachmann@gmail.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Roman Bogorodskiy <novel@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: Getting /dev entry by interface name
Message-ID:  <CACc-My1mVKAqCCy4obVWa3EFpcA7kKxd2aG9SOsRk-5MuTtebw@mail.gmail.com>
In-Reply-To: <37078.1523089049@critter.freebsd.dk>
References:  <20180407025807.GA18883@kloomba> <37078.1523089049@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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@phk.freebsd.dk> wrote:
> --------
> 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.
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACc-My1mVKAqCCy4obVWa3EFpcA7kKxd2aG9SOsRk-5MuTtebw>