mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 10:14:41 +00:00
3df662f534
A profile can configure "connection.wait-device-timeout" to indicate that startup complete is blocked until a suitable device around. This is useful for NetworkManager-wait-online and initrd mode. Previously, we looked at NMPlatform whether a link with matching interface-name was present. That is wrong because it cannot handle profiles that rely on "ethernet.mac-address" setting or other "match" settings. Also, the mere presence of the link does not yet mean that the NMDevice was created and ready. In fact, there is a race here: NMPlatform indicates that the device is ready (unblocking NMSettings), but there is no corresponding NMDevice yet which keeps NetworkManager busy to block startup complete. Rework this. Now, only check whether there is a compatible device for the profile. Since we wait for compatible devices, it works now not only for the interface name. Note that we do some optimizations so that we don't have to re-evaluate all profiles (w.r.t. all devices) whenever something on the device changes: we only care about this when all devices finally become ready. Also, we no longer start the timeout for "connection.wait-device-timeout" when the profile appears. Instead, there is one system-wide start time (NMSettingsPrivate.startup_complete_start_timestamp_msec). That simplifies code and makes sense: we start waiting when NetworkManager is starting, not when the profile gets added. Also, we wait for all profiles to become ready together. |
||
---|---|---|
.. | ||
tests | ||
meson.build | ||
nm-client-utils.c | ||
nm-client-utils.h | ||
nm-meta-setting-access.c | ||
nm-meta-setting-access.h | ||
nm-meta-setting-desc.c | ||
nm-meta-setting-desc.h | ||
nm-polkit-listener.c | ||
nm-polkit-listener.h | ||
nm-secret-agent-simple.c | ||
nm-secret-agent-simple.h | ||
nm-vpn-helpers.c | ||
nm-vpn-helpers.h | ||
qrcodegen.c | ||
qrcodegen.h | ||
settings-docs.h.in | ||
settings-docs.xsl |