mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 23:28:08 +02:00
manager: ignore unmanaged devices when looking for parent by UUID
If the device is unmanaged, it is not compatible with any connection. https://mail.gnome.org/archives/networkmanager-list/2017-September/msg00032.html
This commit is contained in:
parent
8a5ebd3cb7
commit
ed640f857a
1 changed files with 4 additions and 0 deletions
|
|
@ -1155,6 +1155,10 @@ find_parent_device_for_connection (NMManager *self, NMConnection *connection, NM
|
||||||
for (iter = priv->devices; iter; iter = iter->next) {
|
for (iter = priv->devices; iter; iter = iter->next) {
|
||||||
NMDevice *candidate = iter->data;
|
NMDevice *candidate = iter->data;
|
||||||
|
|
||||||
|
/* Unmanaged devices are not compatible with any connection */
|
||||||
|
if (!nm_device_get_managed (candidate, FALSE))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (nm_device_get_settings_connection (candidate) == parent_connection)
|
if (nm_device_get_settings_connection (candidate) == parent_connection)
|
||||||
return candidate;
|
return candidate;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue