From 787455bae149a1f9fd7152aab290be6c7a4d39f3 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 3 Mar 2014 11:49:28 -0600 Subject: [PATCH] wifi: add HIDDEN flag for completed connections without an AP (rh #1069844) If an AP object is not given, and no compatible AP can be found in the scan list, the AP is most likely not broadcasting its SSID and should be marked as 'hidden'. --- src/devices/nm-device-wifi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/devices/nm-device-wifi.c b/src/devices/nm-device-wifi.c index b3b8c70f96..06ac602a2a 100644 --- a/src/devices/nm-device-wifi.c +++ b/src/devices/nm-device-wifi.c @@ -1142,6 +1142,7 @@ complete_connection (NMDevice *device, NMAccessPoint *ap = NULL; const GByteArray *ssid = NULL; GSList *iter; + gboolean hidden = FALSE; s_wifi = nm_connection_get_setting_wireless (connection); s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -1191,6 +1192,8 @@ complete_connection (NMDevice *device, g_slist_free (settings); if (!valid) return FALSE; + + hidden = TRUE; } } else { ap = get_ap_by_path (self, specific_object); @@ -1268,6 +1271,9 @@ complete_connection (NMDevice *device, g_free (str_ssid); g_free (format); + if (hidden) + g_object_set (s_wifi, NM_SETTING_WIRELESS_HIDDEN, TRUE, NULL); + setting_mac = nm_setting_wireless_get_mac_address (s_wifi); if (setting_mac) { /* Make sure the setting MAC (if any) matches the device's permanent MAC */