systemd/network
Zbigniew Jędrzejewski-Szmek 152c8946b3
Revert "network: add "mac" to alternatives name policy by default" (#33227)
This reverts commit 0f5a529217.

As discussed in https://github.com/systemd/systemd/issues/33104,
that patch caused problems in Debian which has a udev drop-in with

  [Match]
  Path=*-usb-*

  [Link]
  NamePolicy=mac

The rename fails:
   eth0: Policy *mac* yields "enx00*".
   eth0: /usr/lib/udev/rules.d/80-net-setup-link.rules:11 NAME 'enx00*'
   eth0: /usr/lib/udev/rules.d/99-systemd.rules:69 RUN '/usr/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$
   eth0: sd-device: Created database file '/run/udev/data/n9' for '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:
   eth0: Failed to rename network interface 9 from 'eth0' to 'enx00*': File exists
   eth0: sd-device: Created database file '/run/udev/data/n9' for '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:
   eth0: Failed to process device, ignoring: File exists

Two network interfaces have the same MAC and it's not marked NET_ADDR_STOLEN.
In this case the conflict is very visible because it causes the rename to fail,
but it would also occur in other cases, for alternative names.

A patch has been submitted for r8152 to properly set NET_ADDR_STOLEN:
https://lore.kernel.org/linux-usb/20240605153340.25694-1-gmazyland@gmail.com/T/#u

Let's revert this now to avoid a regression. We can try again after the kernel
issue is resolved.

Closes https://github.com/systemd/systemd/issues/33104.
2024-06-06 17:35:46 +01:00
..
80-6rd-tunnel.link network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-6rd-tunnel.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-auto-link-local.network.example network: disable IPv6AcceptRA= in several default config 2023-11-03 11:41:52 +09:00
80-container-host0-tun.network network: configure a tun host0 interface in a container 2024-05-16 14:37:28 +02:00
80-container-host0.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-container-vb.link network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-container-vb.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-container-ve.link network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-container-ve.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-container-vz.link network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-container-vz.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-namespace-ns.link network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-namespace-ns.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-vm-vt.link network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-vm-vt.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-wifi-adhoc.network network: suggest using "networkctl edit" instead of copying manually 2024-04-23 20:02:19 +08:00
80-wifi-ap.network.example network: disable IPv6AcceptRA= in several default config 2023-11-03 11:41:52 +09:00
80-wifi-station.network.example network: change license of examples to MIT-0 2022-10-26 08:39:34 +02:00
89-ethernet.network.example network: make 89-ethernet.network match only physical interfaces 2023-11-08 23:11:45 +09:00
99-default.link Revert "network: add "mac" to alternatives name policy by default" (#33227) 2024-06-06 17:35:46 +01:00
meson.build network: configure a tun host0 interface in a container 2024-05-16 14:37:28 +02:00