Skip to content

[libudev] 1.0.3.r5.bbeb7ad-3: scan all network interfaces #4128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: libudev
Choose a base branch
from

Conversation

JulianDroske
Copy link

@JulianDroske JulianDroske commented May 17, 2025

It makes NetworkManager think all network interfaces are ready, and will manage all of them instead of showing "unmanaged" states.

After this PR, the patch force-platform-init.patch 1 2 may no longer needed.

PS: It's still recommended to install "ethtool" (to avoid conflicts 3).

For now libudev-zero only scans device nodes under /sys/dev which never
contain any network device. This behaviour would cause NetworkManger refuse to
manage any device and show an "unmanaged" state, since it would think that no
device had been initialized yet after calling udev_enumerate_scan_devices(),
with an "initialized" filter set by udev_enumerate_add_match_is_initialized() [1].

Given the daemonless design, it's tricky for libudev-zero to remember whether a
device is initialized, so the workaround is to add the path "/sys/class/net" to
the scan list, for now.

Notice that this patch has the same effect as setting PLATFORM_INIT to true in
nm-device.c [2], so it actually doesn't make everything right. Luckily, after
ethtool is engaged in udev helper script [3], the settle script in eweOS would
not conflict with NetworkManager, more specifically the random macaddr feature
[4].

[1]: https://github.com/NetworkManager/NetworkManager/blob/dd7252ff0c98fa1eed5c0e5a7b9ebcb63aef93a2/src/libnm-platform/nm-linux-platform.c#L12171
[2]: illiliti/libudev-zero#72
[3]: eweOS#2995
[4]: https://github.com/NetworkManager/NetworkManager/blob/dd7252ff0c98fa1eed5c0e5a7b9ebcb63aef93a2/man/NetworkManager.conf.xml#L1374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant