Bug#812575: udev: predictable network device names fails for USB devices without a permanent hw address

Bjørn Mork bjorn at mork.no
Sat Jan 30 19:28:05 GMT 2016


Michael Biebl <biebl at debian.org> writes:

> Hi Bjørn,
>
> On Mon, 25 Jan 2016 09:27:31 +0100 =?utf-8?q?Bj=C3=B8rn_Mork?=
> <bjorn at mork.no> wrote:
>> I just noticed that the new "predictable" network device names logic
>> fails in a most ugly way with USB devices with no permanent mac
>> address:
>> 
>>  [   10.989584] qmi_wwan 6-4:1.10 wwx2ac56637bccb: renamed from wwan1
>>  [   11.019362] qmi_wwan 6-4:1.8 rename4: renamed from wwan0
>> 
>> 
>> There are two issues here:
>> 
>> 1) the name is derived from a random mac address, which is regenerated
>>    on each boot.  Note that the address does have the 'local' bit set:
>>     2a:c5:66:37:bc:cb
>> 
>> 2) there are two such network interfaces present. The 'usbnet' driver
>>   infrastructure will generate an address on module init and reuse
>>   the very same address for every USB device needing one. Naturally,
>>   trying to name more than one interface after the same address fails,
>>   and you end up with an even uglier 'rename4' device name...
>
> That sounds like a bug in the driver to me.

Why? There is no way you can have more than two devices connected to
each link, so the actual addresses don't really matter.  And even if you
could connect this to a switch or whatever, I thought Sun had educated
the masses by now.

>> The old persistent network device logic used to avoid mapping against
>> locally administered mac addresses.  This logic needs to be kept for
>> the new  "predictable" names too.  Anything else is a regression.
>
> Is there a way to detect such "locally administered mac addresses"?

Of course there is.  The 75-persistent-net-generator.rules of the past
did this just fine with a simple glob match:

 ENV{MATCHADDR}=="?[2367abef]:*",        ENV{MATCHADDR}=""

Which is why this bug is a regression.

>> But even with this in place, the new logic should be prepared for
>> duplicate mac addresses.  There are plenty of USB devices with non-
>> unique mac addresses out there.  It's more of a rule than an exception
>> for GSM/LTE modem devices...
>
> Please consider raising this issue upstream and filing a bug at
> https://github.com/systemd/systemd/issues/new

Sorry.  I don't really care about systemd.  Just thought it would be
nice to document this bug for the next user hitting it.


Bjørn





More information about the Pkg-systemd-maintainers mailing list