Michael Biebl <bi...@debian.org> writes: >> 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
Just FYI, I stumbled across the upstream systemd sources on my disk (have a lof cruft laying around :) and noticed that this problem is not present there. The "net_setup_link" builtin helper is very careful to avoid basing its names on local mac addresses or random addresses. Both which are true in the case I reported. usbnet based drivers will set addr_assign_type to NET_ADDR_RANDOM when appropriate: bjorn@nemi:~$ grep . /sys/class/net/wwan*/addr_assign_type /sys/class/net/wwan0/addr_assign_type:1 /sys/class/net/wwan1/addr_assign_type:1 The bug was introduced by this commit, trying to work around the upstream bogus assumption that USB bus numbers are stable: commit 51009270be5da77a0e11b313190ef12ab401c007 Author: Martin Pitt <martin.p...@ubuntu.com> Date: Wed Jun 3 12:48:42 2015 +0200 Add debian/extra/01-mac-for-usb.link: Use MAC based names for network interfaces which are (directly or indirectly) on USB Path based names are inadequate for dynamic buses like USB. See discussion on https://lists.debian.org/debian-devel/2015/05/msg00170.html and revised proposal on https://lists.debian.org/debian-devel/2015/06/msg00018.html And I recall even being part of that discussion. Obviously without getting the message trough. So let me try again: You CANNOT create a stable name for USB devices. The reason is pretty simple and should be bloody obvious: You have no stable and unique input parameteres. Every single attribute you have access to is either shared with multiple devices or subject to change. So if you insist on renaming these devices, then you will fail. Bjørn