summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-09-24 14:42:51 -0500
committerDan Williams <dcbw@redhat.com>2015-04-27 14:00:59 -0500
commit5791c0decf28611c60275d01a4235397e6f08ce9 (patch)
tree9d2712dd151a6a0b1100fd34dd692ba5ee465586
parent014c04e73423c2d7d1f7e12ee6b5ead6f2aa917c (diff)
downloadNetworkManager-5791c0decf28611c60275d01a4235397e6f08ce9.tar.gz
settings: ignore incompatible connections when looking for existing ones
beb18050 made this code run for all devices instead of just ethernet devices, which means any kind of connection gets compared to any device. But only compatible connections should be considered.
-rw-r--r--src/settings/nm-settings.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index 4a03f4a5f2..76c9843b91 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -1574,6 +1574,9 @@ have_connection_for_device (NMSettings *self, NMDevice *device)
NMConnection *connection = NM_CONNECTION (data);
const char *ctype, *iface;
+ if (!nm_device_check_connection_compatible (device, connection))
+ continue;
+
s_con = nm_connection_get_setting_connection (connection);
iface = nm_setting_connection_get_interface_name (s_con);