summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-01-27 18:38:00 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-01-29 16:43:19 +0100
commit336bfcabc4f5563799bf0f52cfa17ce2425ea375 (patch)
treebe6a053b22f304af1f054b432311846cf0789409
parent2b17f246f0b618a2608c7a85f261831a056b4d4c (diff)
downloadNetworkManager-336bfcabc4f5563799bf0f52cfa17ce2425ea375.tar.gz
manager: skip activation of a virtual device if master is missing
Don't realize a virtual device if the master is missing because in such case the autoactivation can't start and a stale link will be created.
-rw-r--r--src/nm-manager.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 1b00b1d320..71a665494e 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,