[PATCH 1/4] manager: ignore unmanaged devices when looking for parent by UUID
- From: Beniamino Galvani <bgalvani redhat com>
- To: networkmanager-list gnome org
- Subject: [PATCH 1/4] manager: ignore unmanaged devices when looking for parent by UUID
- Date: Wed, 27 Sep 2017 11:02:40 +0200
If the device is unmanaged, it is not compatible with any connection.
https://mail.gnome.org/archives/networkmanager-list/2017-September/msg00032.html
---
src/nm-manager.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/nm-manager.c b/src/nm-manager.c
index d0429fe9e..2e47a9759 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -1155,6 +1155,10 @@ find_parent_device_for_connection (NMManager *self, NMConnection *connection, NM
for (iter = priv->devices; iter; iter = iter->next) {
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)
return candidate;
--
2.13.5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]