diff options
author | Jouni Malinen <j@w1.fi> | 2017-02-05 13:52:43 +0200 |
---|---|---|
committer | Ivan Kutepov <its.kutepov@gmail.com> | 2017-10-19 21:50:40 +0300 |
commit | edbdf859abf8ac76b27f54a7b11be6aecbb83ebc (patch) | |
tree | 71c07f36d7b5a13221987f2189161e30848a2e90 | |
parent | dc6ca4340a7ad6005a2e13b66bb2995e8010aa82 (diff) | |
download | android_external_wpa_supplicant_8-edbdf859abf8ac76b27f54a7b11be6aecbb83ebc.tar.gz android_external_wpa_supplicant_8-edbdf859abf8ac76b27f54a7b11be6aecbb83ebc.tar.bz2 android_external_wpa_supplicant_8-edbdf859abf8ac76b27f54a7b11be6aecbb83ebc.zip |
Set EAPOL-Key Key Length field to 0 for group message 1/2 in RSN
P802.11i/D3.0 described the Key Length as having value 16 for the group
key handshake. However, this was changed to 0 in the published IEEE Std
802.11i-2004 amendment (and still remains 0 in the current standard IEEE
Std 802.11-2016). We need to maintain the non-zero value for WPA (v1)
cases, but the RSN case can be changed to 0 to be closer to the current
standard.
Change-Id: I96d654977f7e801a8993d017dad7465cc4aba758
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r-- | src/ap/wpa_auth.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index f23a57a0..f9c7d4c5 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -1479,9 +1479,11 @@ void __wpa_send_eapol(struct wpa_authenticator *wpa_auth, WPA_PUT_BE16(key->key_info, key_info); alg = pairwise ? sm->pairwise : wpa_auth->conf.wpa_group; - WPA_PUT_BE16(key->key_length, wpa_cipher_key_len(alg)); - if (key_info & WPA_KEY_INFO_SMK_MESSAGE) + if ((key_info & WPA_KEY_INFO_SMK_MESSAGE) || + (sm->wpa == WPA_VERSION_WPA2 && !pairwise)) WPA_PUT_BE16(key->key_length, 0); + else + WPA_PUT_BE16(key->key_length, wpa_cipher_key_len(alg)); /* FIX: STSL: what to use as key_replay_counter? */ for (i = RSNA_MAX_EAPOL_RETRIES - 1; i > 0; i--) { |