mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 22:19:23 +01:00
handshake: handle OSEN AKM when setting IEs
This commit is contained in:
parent
b09dbcd5ac
commit
058d65c686
@ -143,7 +143,13 @@ static bool handshake_state_setup_own_ciphers(struct handshake_state *s,
|
|||||||
s->pairwise_cipher = info->pairwise_ciphers;
|
s->pairwise_cipher = info->pairwise_ciphers;
|
||||||
s->group_cipher = info->group_cipher;
|
s->group_cipher = info->group_cipher;
|
||||||
s->group_management_cipher = info->group_management_cipher;
|
s->group_management_cipher = info->group_management_cipher;
|
||||||
s->mfp = info->mfpc;
|
|
||||||
|
/*
|
||||||
|
* Dont set MFP for OSEN otherwise EAPoL will attempt to negotiate a
|
||||||
|
* iGTK which is not allowe for OSEN.
|
||||||
|
*/
|
||||||
|
if (!s->osen_ie)
|
||||||
|
s->mfp = info->mfpc;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -156,6 +162,7 @@ bool handshake_state_set_authenticator_ie(struct handshake_state *s,
|
|||||||
l_free(s->authenticator_ie);
|
l_free(s->authenticator_ie);
|
||||||
s->authenticator_ie = l_memdup(ie, ie[1] + 2u);
|
s->authenticator_ie = l_memdup(ie, ie[1] + 2u);
|
||||||
s->wpa_ie = is_ie_wpa_ie(ie + 2, ie[1]);
|
s->wpa_ie = is_ie_wpa_ie(ie + 2, ie[1]);
|
||||||
|
s->osen_ie = is_ie_wfa_ie(ie + 2, ie[1], IE_WFA_OI_OSEN);
|
||||||
|
|
||||||
if (!s->authenticator)
|
if (!s->authenticator)
|
||||||
return true;
|
return true;
|
||||||
@ -163,6 +170,9 @@ bool handshake_state_set_authenticator_ie(struct handshake_state *s,
|
|||||||
if (s->wpa_ie) {
|
if (s->wpa_ie) {
|
||||||
if (ie_parse_wpa_from_data(ie, ie[1] + 2, &info) < 0)
|
if (ie_parse_wpa_from_data(ie, ie[1] + 2, &info) < 0)
|
||||||
return false;
|
return false;
|
||||||
|
} else if (s->osen_ie) {
|
||||||
|
if (ie_parse_osen_from_data(ie, ie[1] + 2, &info) < 0)
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (ie_parse_rsne_from_data(ie, ie[1] + 2, &info) < 0)
|
if (ie_parse_rsne_from_data(ie, ie[1] + 2, &info) < 0)
|
||||||
return false;
|
return false;
|
||||||
@ -179,6 +189,7 @@ bool handshake_state_set_supplicant_ie(struct handshake_state *s,
|
|||||||
l_free(s->supplicant_ie);
|
l_free(s->supplicant_ie);
|
||||||
s->supplicant_ie = l_memdup(ie, ie[1] + 2u);
|
s->supplicant_ie = l_memdup(ie, ie[1] + 2u);
|
||||||
s->wpa_ie = is_ie_wpa_ie(ie + 2, ie[1]);
|
s->wpa_ie = is_ie_wpa_ie(ie + 2, ie[1]);
|
||||||
|
s->osen_ie = is_ie_wfa_ie(ie + 2, ie[1], IE_WFA_OI_OSEN);
|
||||||
|
|
||||||
if (s->authenticator)
|
if (s->authenticator)
|
||||||
return true;
|
return true;
|
||||||
@ -186,6 +197,9 @@ bool handshake_state_set_supplicant_ie(struct handshake_state *s,
|
|||||||
if (s->wpa_ie) {
|
if (s->wpa_ie) {
|
||||||
if (ie_parse_wpa_from_data(ie, ie[1] + 2, &info) < 0)
|
if (ie_parse_wpa_from_data(ie, ie[1] + 2, &info) < 0)
|
||||||
return false;
|
return false;
|
||||||
|
} else if (s->osen_ie) {
|
||||||
|
if (ie_parse_osen_from_data(ie, ie[1] + 2, &info) < 0)
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (ie_parse_rsne_from_data(ie, ie[1] + 2, &info) < 0)
|
if (ie_parse_rsne_from_data(ie, ie[1] + 2, &info) < 0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -103,6 +103,7 @@ struct handshake_state {
|
|||||||
bool have_snonce : 1;
|
bool have_snonce : 1;
|
||||||
bool ptk_complete : 1;
|
bool ptk_complete : 1;
|
||||||
bool wpa_ie : 1;
|
bool wpa_ie : 1;
|
||||||
|
bool osen_ie : 1;
|
||||||
bool have_pmk : 1;
|
bool have_pmk : 1;
|
||||||
bool mfp : 1;
|
bool mfp : 1;
|
||||||
bool have_anonce : 1;
|
bool have_anonce : 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user