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.
This commit is contained in:
Beniamino Galvani 2020-01-27 18:38:00 +01:00
parent 2b17f246f0
commit 336bfcabc4

View file

@ -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,