]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT: Fix the calculation of MIC Control field in FTIE
authorHong Wu <Hong.Wu@dspg.com>
Sat, 16 Jul 2011 07:57:17 +0000 (10:57 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 16 Jul 2011 07:57:17 +0000 (10:57 +0300)
Reassociation Request/Response frame validation need to count all IEs in
the RIC. In addition, TIE is not protected, so it should not be included
in the count.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
src/ap/wpa_auth_ft.c
src/rsn_supp/wpa_ft.c

index 65f5f4caa7f576b22e83b6e6ef86bb78bd98d9c9..aac1400b6565dfd78b08e9e4c9e5fe32bb888f96 100644 (file)
@@ -1207,7 +1207,7 @@ u16 wpa_ft_validate_reassoc(struct wpa_state_machine *sm, const u8 *ies,
 
        count = 3;
        if (parse.ric)
-               count++;
+               count += ieee802_11_ie_count(parse.ric, parse.ric_len);
        if (ftie->mic_control[1] != count) {
                wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
                           "Control: received %u expected %u",
index da6e966f653d8b14fcd676973f71a2408cbfa678..90f867c2f581feb40324ae5687801fba10b17f76 100644 (file)
@@ -950,8 +950,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
        }
 
        count = 3;
-       if (parse.tie)
-               count++;
+       if (parse.ric)
+               count += ieee802_11_ie_count(parse.ric, parse.ric_len);
        if (ftie->mic_control[1] != count) {
                wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
                           "Control: received %u expected %u",