3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 13:59:24 +01:00

network: allow connections to hotspot networks

This commit is contained in:
James Prestwood 2019-06-26 15:15:58 -07:00 committed by Denis Kenzior
parent 23a7a5a614
commit 8c0e1f62fc

View File

@ -49,6 +49,7 @@
#include "src/network.h" #include "src/network.h"
#include "src/blacklist.h" #include "src/blacklist.h"
#include "src/util.h" #include "src/util.h"
#include "src/hotspot.h"
struct network { struct network {
char *object_path; char *object_path;
@ -75,7 +76,22 @@ static bool network_settings_load(struct network *network)
if (network->settings) if (network->settings)
return true; return true;
network->settings = storage_network_open(network_get_security(network), /*
* If this network contains NAI realm info OR we have a Hotspot
* provisioning file containing the HESSID we know this is a Hotspot
* network.
*/
if (network->nai_realms || !util_mem_is_zero(network->hessid, 6)) {
network->settings = l_settings_new();
if (!l_settings_load_from_file(network->settings,
hs20_find_settings_file(network))) {
l_settings_free(network->settings);
network->settings = NULL;
}
} else
network->settings = storage_network_open(
network_get_security(network),
network->info->ssid); network->info->ssid);
return network->settings != NULL; return network->settings != NULL;