diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-01-29 16:43:39 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-01-29 16:43:39 +0100 |
commit | 4bdf8c31d3671948ec61564e39c6747b5fdc5fc6 (patch) | |
tree | 038556b18aa16b6b83ab05767f4a253008529194 | |
parent | 2b17f246f0b618a2608c7a85f261831a056b4d4c (diff) | |
parent | ab57b575a0a6bc61806d95011e5a09f2f0d72666 (diff) | |
download | NetworkManager-4bdf8c31d3671948ec61564e39c6747b5fdc5fc6.tar.gz |
merge: branch 'bg/virt-dev-check-master'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/403
https://bugzilla.redhat.com/show_bug.cgi?id=1795919
-rw-r--r-- | src/nm-manager.c | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 1b00b1d320..4bd58da22e 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2011,6 +2011,20 @@ system_create_virtual_device (NMManager *self, NMConnection *connection) return device; } + if (!find_master (self, + connection, + device, + NULL, + NULL, + NULL, + &error)) { + _LOG3D (LOGD_DEVICE, connection, + "skip activation: %s", + error->message); + g_error_free (error); + return device; + } + /* Create backing resources if the device has any autoconnect connections */ connections = nm_settings_get_connections_clone (priv->settings, NULL, NULL, NULL, @@ -4649,6 +4663,19 @@ _internal_activate_device (NMManager *self, NMActiveConnection *active, GError * if (nm_active_connection_get_activation_type (active) == NM_ACTIVATION_TYPE_MANAGED) nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_MANAGED); + /* Try to find the master connection/device if the connection has a dependency */ + if (!find_master (self, + applied, + device, + &master_connection, + &master_device, + &master_ac, + error)) { + g_prefix_error (error, "Can not find a master for %s: ", + nm_settings_connection_get_id (sett_conn)); + return FALSE; + } + /* Create any backing resources the device needs */ if (!nm_device_is_real (device)) { NMDevice *parent; @@ -4717,19 +4744,6 @@ _internal_activate_device (NMManager *self, NMActiveConnection *active, GError * } } - /* Try to find the master connection/device if the connection has a dependency */ - if (!find_master (self, - applied, - device, - &master_connection, - &master_device, - &master_ac, - error)) { - g_prefix_error (error, "Can not find a master for %s: ", - nm_settings_connection_get_id (sett_conn)); - return FALSE; - } - /* Ensure there's a master active connection the new connection we're * activating can depend on. */ |