NetworkManager/src
Thomas Haller 3df662f534
settings: rework wait-device-timeout handling and consider device compatibility
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.
2020-08-12 16:40:56 +02:00
..
devices platform: add support for configuring bridge settings via netlink 2020-08-07 13:20:54 +02:00
dhcp dhcp: export the DHCPv6 FQDN option 2020-08-06 10:16:09 +02:00
dns core: change NM_IS_IP_CONFIG() to have no additional argument 2020-08-05 12:47:55 +02:00
dnsmasq all: fix minor typos 2020-07-07 11:33:46 +02:00
initrd initrd: wait for bootdev or all devices if rd.neednet=1 2020-08-06 16:52:35 +02:00
ndisc ndisc/tests: relax assertion in "test-ndisc-fake.c" 2020-07-07 22:32:35 +02:00
platform platform: add support for configuring bridge settings via netlink 2020-08-07 13:20:54 +02:00
ppp license: Add license using SPDX identifiers to meson build files 2020-02-17 13:16:57 +01:00
settings settings: rework wait-device-timeout handling and consider device compatibility 2020-08-12 16:40:56 +02:00
supplicant all: fix minor typos 2020-07-07 11:33:46 +02:00
systemd systemd: merge branch systemd into master 2020-08-04 17:20:21 +02:00
tests shared: change NM_SWAP() macro to take pointer arguments 2020-08-06 18:12:01 +02:00
vpn core: fix generation of dependent local routes for VRFs 2020-07-15 10:57:49 +02:00
main-utils.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
main-utils.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
main.c config: print config warnings during NetworkManager --print-config 2019-12-11 11:52:05 +01:00
meson.build core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
NetworkManagerUtils.c core: merge IPv4/IPv6 implementations of nm_utils_ip_{addresses,routes}_to_dbus() 2020-08-05 12:47:55 +02:00
NetworkManagerUtils.h core: merge IPv4/IPv6 implementations of nm_utils_ip_{addresses,routes}_to_dbus() 2020-08-05 12:47:55 +02:00
nm-act-request.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-act-request.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-active-connection.c core: fix check on master active-connection failure 2020-07-17 08:56:28 +02:00
nm-active-connection.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-audit-manager.c shared: nm-auth-subject: add unix-session type 2019-12-24 10:13:51 +01:00
nm-audit-manager.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-auth-manager.c auth-manager: watch PolicyKit name owner to emit changed signal when name owner appears 2020-04-21 12:19:43 +02:00
nm-auth-manager.h shared: move nm-dbus-auth-subject to shared/nm-libnm-core-intern 2019-12-24 10:13:51 +01:00
nm-auth-utils.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-auth-utils.h all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-checkpoint-manager.c all: use nm_dbus_path_not_empty() 2019-11-07 11:34:36 +01:00
nm-checkpoint-manager.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-checkpoint.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-checkpoint.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-config-data.c config: use NM_STR_HAS_PREFIX_WITH_MORE() instead of duplicate implementation 2020-05-07 14:08:33 +02:00
nm-config-data.h config: add nm_config_data_get_warnings() to get additional warnings about wrong configuration 2019-12-11 11:52:05 +01:00
nm-config.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-config.h config: avoid lgtm.com warning about int bitfield for NMConfigDeviceStateData.nm_owned 2020-05-07 13:58:09 +02:00
nm-connectivity.c shared: drop _STATIC variant of macros that define functions 2020-02-13 17:17:07 +01:00
nm-connectivity.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-core-utils.c shared,core: extend nm_utils_is_specific_hostname() and move to shared 2020-08-05 12:47:55 +02:00
nm-core-utils.h core: add nm_utils_ip4_address_is_zeronet() helper 2020-07-31 08:53:05 +02:00
nm-dbus-manager.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-dbus-manager.h shared: move nm-dbus-auth-subject to shared/nm-libnm-core-intern 2019-12-24 10:13:51 +01:00
nm-dbus-object.c core: add nm_dbus_object_unexport_on_idle() helper 2020-08-05 12:47:55 +02:00
nm-dbus-object.h core: add nm_dbus_object_unexport_on_idle() helper 2020-08-05 12:47:55 +02:00
nm-dbus-utils.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-dbus-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-dcb.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-dcb.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-dhcp-config.c shared,core: rename and move function to nm_utils_strdict_to_variant_asv() 2020-06-19 17:07:26 +02:00
nm-dhcp-config.h core: add common base class NMDhcpConfig for NMDhcp[46]Config and merge them 2020-02-21 15:59:44 +01:00
nm-dispatcher.c device: merge nm_device_get_dhcp[46]_config() to nm_device_get_dhcp_config() 2020-02-21 15:59:44 +01:00
nm-dispatcher.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-firewall-manager.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-firewall-manager.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-hostname-manager.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-hostname-manager.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-iface-helper.c core: fix generation of dependent local routes for VRFs 2020-07-15 10:57:49 +02:00
nm-ip-config.c core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip-config.h core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip4-config.c core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip4-config.h core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip6-config.c core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-ip6-config.h core: add NMIPConfig as base class for NMIP[46]Config 2020-08-05 12:47:55 +02:00
nm-keep-alive.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-keep-alive.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-l3-config-data.c l3cfg: change l3cd for-each macros to take pointers instead of variable names 2020-08-06 18:12:02 +02:00
nm-l3-config-data.h l3cfg: change l3cd for-each macros to take pointers instead of variable names 2020-08-06 18:12:02 +02:00
nm-l3cfg.c l3cfg: change l3cd for-each macros to take pointers instead of variable names 2020-08-06 18:12:02 +02:00
nm-l3cfg.h l3cfg: rename NML3ConfigData instances from l3cfg to l3cd 2020-08-05 12:47:55 +02:00
nm-logging.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nm-logging.h core: move _LOG*() macros to "shared/nm-glib-aux/nm-logging-fwd.h" 2019-11-22 15:32:52 +01:00
nm-manager.c settings: rework wait-device-timeout handling and consider device compatibility 2020-08-12 16:40:56 +02:00
nm-manager.h all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-netns.c l3cfg: track externally removed addresses/routes 2020-07-31 08:53:07 +02:00
nm-netns.h core: add "nm-l3cfg.[hc]" 2020-07-23 15:29:24 +02:00
nm-pacrunner-manager.c all: drop explicit casts from _GET_PRIVATE() macro calls 2020-02-14 11:04:46 +01:00
nm-pacrunner-manager.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-policy.c policy: get the DHCPv6 hostname from the FQDN option 2020-08-06 10:16:09 +02:00
nm-policy.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-proxy-config.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
nm-proxy-config.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-rfkill-manager.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-rfkill-manager.h all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-session-monitor.c all: use nm_clear_pointer() instead of g_clear_pointer() 2020-03-23 11:22:38 +01:00
nm-session-monitor.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-sleep-monitor.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-sleep-monitor.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-test-utils-core.h libnm/keyfile: build keyfile code as separate GPL licensed internal library 2020-01-07 13:17:47 +01:00
nm-types.h platform: add support for configuring bridge settings via netlink 2020-08-07 13:20:54 +02:00
org.freedesktop.NetworkManager.conf dbus: pretty format "org.freedesktop.NetworkManager.conf" 2020-04-15 19:17:00 +02:00