Bug#982688: wireless interface name unstable across reboots

Andreas Henriksson andreas at fatal.se
Sat Feb 13 18:00:08 GMT 2021


Hello Michael, Yuri,

On Sat, Feb 13, 2021 at 06:45:11PM +0100, Yuri D'Elia wrote:
> On Sat, Feb 13 2021, Michael Biebl wrote:
> >> If I want to keep exiting interface names I'd rather have to do this
> >> configuration explicitly.
> >
> > By masking 80-iwd.link, both udev and iwd race against each other.
> > Sometimes udev is fast enough to rename the interface, sometimes iwd is
> > quick enough and claims the interface and udev can't rename anymore,
> > because the interface is busy.
> >
> > TTBOMK this is not really fixable, which is why iwd started to ship 80-
> > iwd.link in the first place, so no renaming is going to happen.

>From the iwd perspective, it:
- does not care about interface names
- is specifically designed to bring up networking as fast as possible

To the best of my knowledge, the problem/race is when iwd manages
to bring UP the interface before udev tries to rename it...
as Linux does not allow renaming UP interfaces!
You can go ask them (linux developers) why and if they're willing to
lift that restriction, which would allow udev to rename the interfaces
even if it tries to do so after they are already UP (by iwd or other
means).

> >
> > I'm not sure what udev can do about this, unfortunately.
> 
> I see. This highlights a major problem with stable network names though.
> 
> If there's a speed race against udev during boot, there's no guarantee
> any other service can use these "stable" names at any point until the
> events have fully settled.
> 
> Is it possible to synthesize a target for network interface names, to be
> reached when all network interface names have settled somehow?

As I see it the problem is that you currently have 2 options, but you
configured things to be in a broken middle state.

Either you don't care about interface names and you disable the udev
rules for wireless interfaces (iwd default config),
or you say that naming is more important than speed to you so you mask
the configuration shipped by iwd and then make iwd wait for udev rules
to be applied.

I've not seen any other practically workable options available right now
without having to do fundamental changes to existing policies in other
software - not udev or iwd (eg. linux, et.al.)

Regards,
Andreas Henriksson



More information about the Pkg-systemd-maintainers mailing list