network: add setter/getter/flag for forcing default OWE group

If a OWE network is buggy and requires the default group this info
needs to be stored in network in order for it to set this into the
handshake on future connect attempts.
This commit is contained in:
James Prestwood 2022-08-08 11:22:58 -07:00 committed by Denis Kenzior
parent b094f734e4
commit 7e99f1343c
2 changed files with 16 additions and 0 deletions

View File

@ -88,6 +88,7 @@ struct network {
bool provisioning_hidden:1;
uint8_t transition_disable; /* Temporary cache until info is set */
bool have_transition_disable:1;
bool force_default_owe_group:1;
int rank;
/* Holds DBus Connect() message if it comes in before ANQP finishes */
struct l_dbus_message *connect_after_anqp;
@ -525,6 +526,9 @@ int network_handshake_setup(struct network *network, struct scan_bss *bss,
handshake_state_set_protocol_version(hs, eapol_proto_version);
}
if (hs->akm_suite == IE_RSN_AKM_SUITE_OWE)
hs->force_default_owe_group = network->force_default_owe_group;
/*
* The randomization options in the provisioning file are dependent on
* main.conf: [General].AddressRandomization=network. Any other value
@ -764,6 +768,16 @@ void network_set_info(struct network *network, struct network_info *info)
IWD_NETWORK_INTERFACE, "KnownNetwork");
}
void network_set_force_default_owe_group(struct network *network)
{
network->force_default_owe_group = true;
}
bool network_get_force_default_owe_group(struct network *network)
{
return network->force_default_owe_group;
}
static inline bool __bss_is_sae(const struct scan_bss *bss,
const struct ie_rsn_info *rsn)
{

View File

@ -58,6 +58,8 @@ void network_sync_settings(struct network *network);
const struct network_info *network_get_info(const struct network *network);
void network_set_info(struct network *network, struct network_info *info);
void network_set_force_default_owe_group(struct network *network);
bool network_get_force_default_owe_group(struct network *network);
int network_can_connect_bss(struct network *network,
const struct scan_bss *bss);