aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_ft.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-04-09 10:30:49 (GMT)
committerJouni Malinen <j@w1.fi>2010-04-09 10:30:49 (GMT)
commit1f6e69e07b7308ec4f6017b66bb1df7ee1396793 (patch)
tree980454b49f32be72a44ec6171dce95740b5db9e6 /src/ap/wpa_auth_ft.c
parent6de513fcd305c93b7add6d8c2eb267ec4d21ebe6 (diff)
downloadhostap-1f6e69e07b7308ec4f6017b66bb1df7ee1396793.zip
hostap-1f6e69e07b7308ec4f6017b66bb1df7ee1396793.tar.gz
hostap-1f6e69e07b7308ec4f6017b66bb1df7ee1396793.tar.bz2
FT: Do not add MIC to FTIE during initial MD association
We do not have any keys set at this point so there is no point in adding the MIC. In addition, IEEE Std 802.11r-2008, 11A.4.2 describes this frame to have MIC IE count of 0 and MIC of 0.
Diffstat (limited to 'src/ap/wpa_auth_ft.c')
-rw-r--r--src/ap/wpa_auth_ft.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
index 499efb1..7922a7a 100644
--- a/src/ap/wpa_auth_ft.c
+++ b/src/ap/wpa_auth_ft.c
@@ -688,18 +688,22 @@ u8 * wpa_sm_write_assoc_resp_ies(struct wpa_state_machine *sm, u8 *pos,
pos += res;
_ftie = (struct rsn_ftie *) (ftie + 2);
- _ftie->mic_control[1] = 3; /* Information element count */
+ if (auth_alg == WLAN_AUTH_FT)
+ _ftie->mic_control[1] = 3; /* Information element count */
ric_start = pos;
if (wpa_ft_parse_ies(req_ies, req_ies_len, &parse) == 0 && parse.ric) {
pos = wpa_ft_process_ric(pos, end, parse.ric, parse.ric_len);
- _ftie->mic_control[1] += ieee802_11_ie_count(ric_start,
- pos - ric_start);
+ if (auth_alg == WLAN_AUTH_FT)
+ _ftie->mic_control[1] +=
+ ieee802_11_ie_count(ric_start,
+ pos - ric_start);
}
if (ric_start == pos)
ric_start = NULL;
- if (wpa_ft_mic(sm->PTK.kck, sm->addr, sm->wpa_auth->addr, 6,
+ if (auth_alg == WLAN_AUTH_FT &&
+ wpa_ft_mic(sm->PTK.kck, sm->addr, sm->wpa_auth->addr, 6,
mdie, mdie_len, ftie, ftie_len,
rsnie, rsnie_len,
ric_start, ric_start ? pos - ric_start : 0,