summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/devices/nm-device.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 75ed5655f6..84ed214e45 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -5756,11 +5756,9 @@ nm_device_match_parent (NMDevice *self, const char *parent)
* no connection active on the device or when a connection with
* that UUID is active.
*/
- connection = nm_device_get_applied_connection (self);
- if (!connection)
- return TRUE;
-
- if (!nm_streq0 (parent, nm_connection_get_uuid (connection)))
+ connection = nm_device_get_applied_connection (parent_device);
+ if ( connection
+ && !nm_streq0 (parent, nm_connection_get_uuid (connection)))
return FALSE;
} else {
/* Interface name */