mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-27 02:32:52 +01:00
ie: add is_ie_default_sae_group_oui
Start an OUI list of vendors who have buggy SAE group negotiation
This commit is contained in:
parent
70b6451dc2
commit
f26f51bf8c
26
src/ie.c
26
src/ie.c
@ -1364,6 +1364,32 @@ bool is_ie_wpa_ie(const uint8_t *data, uint8_t len)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* List of vendor OUIs (prefixed with a length byte) which require forcing
|
||||
* the default SAE group.
|
||||
*/
|
||||
static const uint8_t use_default_sae_group_ouis[][5] = {
|
||||
{ 0x04, 0xf4, 0xf5, 0xe8, 0x05 },
|
||||
};
|
||||
|
||||
bool is_ie_default_sae_group_oui(const uint8_t *data, uint16_t len)
|
||||
{
|
||||
unsigned int i;
|
||||
const uint8_t *oui;
|
||||
|
||||
for (i = 0; i < L_ARRAY_SIZE(use_default_sae_group_ouis); i++) {
|
||||
oui = use_default_sae_group_ouis[i];
|
||||
|
||||
if (len < oui[0])
|
||||
continue;
|
||||
|
||||
if (!memcmp(oui + 1, data, oui[0]))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int ie_parse_wpa(struct ie_tlv_iter *iter, struct ie_rsn_info *out_info)
|
||||
{
|
||||
const uint8_t *data = iter->data;
|
||||
|
2
src/ie.h
2
src/ie.h
@ -551,6 +551,8 @@ int ie_parse_wpa_from_data(const uint8_t *data, size_t len,
|
||||
struct ie_rsn_info *info);
|
||||
bool is_ie_wfa_ie(const uint8_t *data, uint8_t len, uint8_t oi_type);
|
||||
bool is_ie_wpa_ie(const uint8_t *data, uint8_t len);
|
||||
bool is_ie_default_sae_group_oui(const uint8_t *data, uint16_t len);
|
||||
|
||||
bool ie_build_wpa(const struct ie_rsn_info *info, uint8_t *to);
|
||||
|
||||
int ie_parse_bss_load(struct ie_tlv_iter *iter, uint16_t *out_sta_count,
|
||||
|
Loading…
Reference in New Issue
Block a user