Commit 787455ba authored by Dan Williams's avatar Dan Williams
Browse files

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'.
parent 85905a1e
......@@ -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 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment