From cf044faf1325d857b6797827a358becb183fcb94 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 24 Sep 2014 14:42:51 -0500 Subject: [PATCH] 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. (cherry picked from commit 77d01c909470058695c16ae0e22ccfd6e604df34) --- src/settings/nm-settings.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 2a6204e9f5..6304e7400c 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -1592,6 +1592,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);