mpdu: relax IE ordering requirements

This commit is contained in:
Denis Kenzior 2019-01-30 11:22:48 -06:00
parent bd7f8bf613
commit 995cbc7ad3
1 changed files with 6 additions and 5 deletions

View File

@ -147,8 +147,12 @@ static bool validate_mgmt_ies(const uint8_t *ies, size_t ies_len,
* with recognizable element IDs." * with recognizable element IDs."
*/ */
for (i = 0; i < last_idx; i++) for (i = 0; i < last_idx; i++)
if (tag == tag_order[i]) if (tag == tag_order[i]) {
goto check_request_response; if (response)
goto check_request_response;
/* Tag is out of order, but ignore this */
}
} }
return true; return true;
@ -163,9 +167,6 @@ check_request_response:
* only requirement being an ascending order of the numerical values * only requirement being an ascending order of the numerical values
* of the IDs. * of the IDs.
*/ */
if (!response)
return false;
tag = ie_tlv_iter_get_tag(&iter); tag = ie_tlv_iter_get_tag(&iter);
while (ie_tlv_iter_next(&iter)) { while (ie_tlv_iter_next(&iter)) {