Browse Source

FT: Fix the calculation of MIC Control field in FTIE

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>
Hong Wu 14 years ago
parent
commit
c284b46141
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/ap/wpa_auth_ft.c
  2. 2 2
      src/rsn_supp/wpa_ft.c

+ 1 - 1
src/ap/wpa_auth_ft.c

@@ -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",

+ 2 - 2
src/rsn_supp/wpa_ft.c

@@ -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",