This previously reserved bit is now used in FTM to help select the
appropriate replay counter. Silence the warning about use of a reserved
bit for this. wlantest does not yet support the actual replay counter
processing for FTM.
Signed-off-by: Jouni Malinen <j@w1.fi>
int keyid;
u8 *decrypted, *frame = NULL;
u8 pn[6], *rsc;
+ u16 fc;
+ u8 mask;
hdr = (const struct ieee80211_hdr *) data;
+ fc = le_to_host16(hdr->frame_control);
if (len < 24 + 4)
return NULL;
return NULL;
}
- if (data[24 + 2] != 0 || (data[24 + 3] & 0x1f) != 0) {
+ mask = 0x1f;
+ if (WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION ||
+ WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION_NO_ACK)
+ mask &= ~0x10; /* FTM */
+ if (data[24 + 2] != 0 || (data[24 + 3] & mask) != 0) {
add_note(wt, MSG_INFO, "CCMP mgmt frame from " MACSTR " used "
"non-zero reserved bit", MAC2STR(hdr->addr2));
}