wlantest: Recognize additional not-Robust Action categories
Do not complain about unprotected Action frames for additional categories that have been defined as not being Robust. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
d82adf1192
commit
0cc6f985d1
2 changed files with 34 additions and 8 deletions
|
@ -611,12 +611,20 @@
|
|||
#define WLAN_ACTION_ROBUST_AV_STREAMING 19
|
||||
#define WLAN_ACTION_UNPROTECTED_DMG 20
|
||||
#define WLAN_ACTION_VHT 21
|
||||
#define WLAN_ACTION_S1G 22
|
||||
#define WLAN_ACTION_S1G_RELAY 23
|
||||
#define WLAN_ACTION_UNPROTECTED_S1G 22
|
||||
#define WLAN_ACTION_S1G 23
|
||||
#define WLAN_ACTION_FLOW_CONTROL 24
|
||||
#define WLAN_ACTION_CTRL_RESP_MCS_NEG 25
|
||||
#define WLAN_ACTION_FILS 26
|
||||
#define WLAN_ACTION_CDMG 27
|
||||
#define WLAN_ACTION_CMMG 28
|
||||
#define WLAN_ACTION_GLK 29
|
||||
#define WLAN_ACTION_HE 30
|
||||
#define WLAN_ACTION_PROTECTED_HE 31
|
||||
#define WLAN_ACTION_WUR 32
|
||||
#define WLAN_ACTION_PROTECTED_FTM 34
|
||||
#define WLAN_ACTION_EHT 36
|
||||
#define WLAN_ACTION_PROTECTED_EHT 37
|
||||
#define WLAN_ACTION_VENDOR_SPECIFIC_PROTECTED 126
|
||||
#define WLAN_ACTION_VENDOR_SPECIFIC 127
|
||||
/* Note: 128-255 used to report errors by setting category | 0x80 */
|
||||
|
|
|
@ -2443,20 +2443,37 @@ static u8 * mgmt_decrypt(struct wlantest *wt, const u8 *data, size_t len,
|
|||
}
|
||||
|
||||
|
||||
static bool is_robust_action_category(u8 category)
|
||||
{
|
||||
return category != WLAN_ACTION_PUBLIC &&
|
||||
category != WLAN_ACTION_HT &&
|
||||
category != WLAN_ACTION_UNPROTECTED_WNM &&
|
||||
category != WLAN_ACTION_SELF_PROTECTED &&
|
||||
category != WLAN_ACTION_UNPROTECTED_DMG &&
|
||||
category != WLAN_ACTION_VHT &&
|
||||
category != WLAN_ACTION_UNPROTECTED_S1G &&
|
||||
category != WLAN_ACTION_HE &&
|
||||
category != WLAN_ACTION_EHT &&
|
||||
category != WLAN_ACTION_VENDOR_SPECIFIC;
|
||||
}
|
||||
|
||||
|
||||
static int check_mgmt_ccmp_gcmp(struct wlantest *wt, const u8 *data, size_t len)
|
||||
{
|
||||
const struct ieee80211_mgmt *mgmt;
|
||||
u16 fc;
|
||||
struct wlantest_bss *bss;
|
||||
struct wlantest_sta *sta;
|
||||
int category = -1;
|
||||
|
||||
mgmt = (const struct ieee80211_mgmt *) data;
|
||||
fc = le_to_host16(mgmt->frame_control);
|
||||
|
||||
if (WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION ||
|
||||
WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION_NO_ACK) {
|
||||
if (len > 24 &&
|
||||
mgmt->u.action.category == WLAN_ACTION_PUBLIC)
|
||||
if ((WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION ||
|
||||
WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION_NO_ACK) &&
|
||||
len > 24) {
|
||||
category = mgmt->u.action.category;
|
||||
if (!is_robust_action_category(category))
|
||||
return 0; /* Not a robust management frame */
|
||||
}
|
||||
|
||||
|
@ -2476,8 +2493,9 @@ static int check_mgmt_ccmp_gcmp(struct wlantest *wt, const u8 *data, size_t len)
|
|||
WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION ||
|
||||
WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION_NO_ACK)) {
|
||||
add_note(wt, MSG_INFO,
|
||||
"Robust individually-addressed management frame sent without CCMP/GCMP by "
|
||||
MACSTR, MAC2STR(mgmt->sa));
|
||||
"Robust individually-addressed management frame (stype=%u category=%d) sent without CCMP/GCMP by "
|
||||
MACSTR, WLAN_FC_GET_STYPE(fc), category,
|
||||
MAC2STR(mgmt->sa));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue