From 00c4e7e73a48ed9a26440b2d46cfaad641e6688e Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 5 Sep 2016 17:00:54 +0200 Subject: [PATCH] ifcfg-rh: add wifi protocols only if present in connection file An empty 802-11-wireless-security.proto is equivalent to 'wpa,rsn'. Previously we added the two protocols when reading the connection and the variables were missing, with the result that an empty value would be read as 'wpa,rsn' at the next restart. This is harmless but makes the two connections appear as different, with bad effects when 'monitor-connection-files' is enabled. Ensure that the original value persists after a write/read cycle. https://bugzilla.gnome.org/show_bug.cgi?id=770907 --- src/settings/plugins/ifcfg-rh/reader.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c index afc9238dc..80d50484d 100644 --- a/src/settings/plugins/ifcfg-rh/reader.c +++ b/src/settings/plugins/ifcfg-rh/reader.c @@ -3160,14 +3160,6 @@ make_wpa_setting (shvarFile *ifcfg, if (allow_rsn && svGetValueBoolean (ifcfg, "WPA_ALLOW_WPA2", TRUE)) nm_setting_wireless_security_add_proto (wsec, "rsn"); - /* If neither WPA_ALLOW_WPA or WPA_ALLOW_WPA2 were present, default - * to both WPA and RSN allowed. - */ - if (!allow_wpa && !allow_rsn && !ieee8021x) { - nm_setting_wireless_security_add_proto (wsec, "wpa"); - nm_setting_wireless_security_add_proto (wsec, "rsn"); - } - g_free (allow_wpa); g_free (allow_rsn); }