]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev-builtin-net_id: ignore firmware_node/sun == 0
authorEtienne Champetier <e.champetier@ateme.com>
Thu, 22 Aug 2024 20:30:56 +0000 (16:30 -0400)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 23 Aug 2024 00:30:49 +0000 (09:30 +0900)
commit448f9f81fd32f8658449101ada2eadd853f6b06b
tree0bb9b75d35a15f50fce34d45e7f62e32ad8e0895
parentb6b9ddb2b59b3506713df5cb99aa880f5140887b
udev-builtin-net_id: ignore firmware_node/sun == 0

Since ID_NET_NAME_SLOT was introduced we ignore slot == 0
https://github.com/systemd/systemd/blob/0035597a30d120f70df2dd7da3d6128fb8ba6051/src/udev/udev-builtin-net_id.c#L139

Qemu sets _SUN to PCI_SLOT() for all NICs, so _SUN is not unique.
https://gitlab.com/qemu-project/qemu/-/issues/2530

In my tests with libvirt I can only set 'slot="0x00"' in interface definition,
so all NICs end up with _SUN == 0, and this commit is enough to avoid the issue.

Fixes 0a4ecc54cb9f2d3418b970c51bfadb69c34ae9eb
src/udev/udev-builtin-net_id.c