commit 058d65c6862e8ee4eecd5d6e84da278afb727f39
parent b09dbcd5acc1325ac961c954f294e44fe7dc7832
Author: James Prestwood <james.prestwood@linux.intel.com>
Date: Mon, 10 Jun 2019 15:46:56 -0700
handshake: handle OSEN AKM when setting IEs
Diffstat:
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/handshake.c b/src/handshake.c
@@ -143,7 +143,13 @@ static bool handshake_state_setup_own_ciphers(struct handshake_state *s,
s->pairwise_cipher = info->pairwise_ciphers;
s->group_cipher = info->group_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;
}
@@ -156,6 +162,7 @@ bool handshake_state_set_authenticator_ie(struct handshake_state *s,
l_free(s->authenticator_ie);
s->authenticator_ie = l_memdup(ie, ie[1] + 2u);
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)
return true;
@@ -163,6 +170,9 @@ bool handshake_state_set_authenticator_ie(struct handshake_state *s,
if (s->wpa_ie) {
if (ie_parse_wpa_from_data(ie, ie[1] + 2, &info) < 0)
return false;
+ } else if (s->osen_ie) {
+ if (ie_parse_osen_from_data(ie, ie[1] + 2, &info) < 0)
+ return false;
} else {
if (ie_parse_rsne_from_data(ie, ie[1] + 2, &info) < 0)
return false;
@@ -179,6 +189,7 @@ bool handshake_state_set_supplicant_ie(struct handshake_state *s,
l_free(s->supplicant_ie);
s->supplicant_ie = l_memdup(ie, ie[1] + 2u);
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)
return true;
@@ -186,6 +197,9 @@ bool handshake_state_set_supplicant_ie(struct handshake_state *s,
if (s->wpa_ie) {
if (ie_parse_wpa_from_data(ie, ie[1] + 2, &info) < 0)
return false;
+ } else if (s->osen_ie) {
+ if (ie_parse_osen_from_data(ie, ie[1] + 2, &info) < 0)
+ return false;
} else {
if (ie_parse_rsne_from_data(ie, ie[1] + 2, &info) < 0)
return false;
diff --git a/src/handshake.h b/src/handshake.h
@@ -103,6 +103,7 @@ struct handshake_state {
bool have_snonce : 1;
bool ptk_complete : 1;
bool wpa_ie : 1;
+ bool osen_ie : 1;
bool have_pmk : 1;
bool mfp : 1;
bool have_anonce : 1;