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>
This commit is contained in:
parent
e1d526293b
commit
c284b46141
2 changed files with 3 additions and 3 deletions
|
@ -1207,7 +1207,7 @@ u16 wpa_ft_validate_reassoc(struct wpa_state_machine *sm, const u8 *ies,
|
||||||
|
|
||||||
count = 3;
|
count = 3;
|
||||||
if (parse.ric)
|
if (parse.ric)
|
||||||
count++;
|
count += ieee802_11_ie_count(parse.ric, parse.ric_len);
|
||||||
if (ftie->mic_control[1] != count) {
|
if (ftie->mic_control[1] != count) {
|
||||||
wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
|
wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
|
||||||
"Control: received %u expected %u",
|
"Control: received %u expected %u",
|
||||||
|
|
|
@ -950,8 +950,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
|
||||||
}
|
}
|
||||||
|
|
||||||
count = 3;
|
count = 3;
|
||||||
if (parse.tie)
|
if (parse.ric)
|
||||||
count++;
|
count += ieee802_11_ie_count(parse.ric, parse.ric_len);
|
||||||
if (ftie->mic_control[1] != count) {
|
if (ftie->mic_control[1] != count) {
|
||||||
wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
|
wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
|
||||||
"Control: received %u expected %u",
|
"Control: received %u expected %u",
|
||||||
|
|
Loading…
Reference in a new issue