:: Re: [DNG] An alternative to renamin…
Góra strony
Delete this message
Reply to this message
Autor: Adam Borowski
Data:  
Dla: dng
Temat: Re: [DNG] An alternative to renaming [was Re: Proposed change in behaviour for ascii: eudev net.ifnames]
On Wed, Aug 23, 2017 at 09:51:46AM +0200, Alessandro Selli wrote:
> On 22/08/2017 at 15:36, Didier Kryn wrote:
>
> >     The advantage of supporting an option like "hwaddr=a0:d3:c1:9d:a5:86"
> > is that the admin is free to specify interfaces by names or by MAC
> > address. Of course, there is now the possibility to change the MAC address
> > of an interface, but this is a case of severe hacking where the admin has
> > to understand what s?he does.

>
> I wholeheartedly agree.
>
> Actually, changing an interface's MAC address is not at all "severe
> hacking", it's as easy as running ip link set address 00:e0:4d:78:5b:5b dev
> eth0, but a boot script needs not do that and anyway there are tools that
> can extract the MAC address directly from the hardware.


At the time of an udev hook (which ifrename and ifupdown's "allow hotplug"
are then called from), the MAC address couldn't have possibly been changed
yet, other than by an udev hook of a higher priority.

This is actually problematic: some network hardware (especially on cheap ARM
SoCs) has no built-in MAC address, thus it needs to be set in software.
Sometimes it's done based on a serial number of the whole machine (thus
useless for interface renaming), sometimes it's outright random.

-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢰⠒⠀⣿⡁ Vat kind uf sufficiently advanced technology iz dis!?
⢿⡄⠘⠷⠚⠋⠀                                        -- Genghis Ht'rok'din
⠈⠳⣄⠀⠀⠀⠀