mpdu: Don't report Action frames as invalid

Declare the two missing frame subtype enum values for Action frames,
assume Action frames are valid.  Once we have specific validation code
for any Action frames elsewhere, we can move it to mpdu_validate, but
right don't try to validate the frame body as there are many subtypes
and we don't use any of them except Neighbor Reports which are actually
really simple.
This commit is contained in:
Andrew Zaborowski 2017-09-22 05:06:28 +02:00 committed by Denis Kenzior
parent 786b93ffc4
commit 58a7032ed9
2 changed files with 6 additions and 1 deletions

View File

@ -153,6 +153,9 @@ static bool validate_mgmt_mpdu(const struct mmpdu_header *mpdu, int len,
return validate_authentication_mmpdu(mpdu, len, offset);
case MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION:
return validate_deauthentication_mmpdu(mpdu, len, offset);
case MPDU_MANAGEMENT_SUBTYPE_ACTION:
case MPDU_MANAGEMENT_SUBTYPE_ACTION_NO_ACK:
return true;
default:
return false;
}

View File

@ -33,7 +33,7 @@ enum mpdu_type {
MPDU_TYPE_MANAGEMENT = 0,
};
/* 802.11, Table 8-1 "Valid type and subtype combinations" */
/* 802.11-2016, Table 9-1 "Valid type and subtype combinations" */
enum mpdu_management_subtype {
MPDU_MANAGEMENT_SUBTYPE_ASSOCIATION_REQUEST = 0x0,
MPDU_MANAGEMENT_SUBTYPE_ASSOCIATION_RESPONSE = 0x1,
@ -47,6 +47,8 @@ enum mpdu_management_subtype {
MPDU_MANAGEMENT_SUBTYPE_DISASSOCIATION = 0xA,
MPDU_MANAGEMENT_SUBTYPE_AUTHENTICATION = 0xB,
MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION = 0xC,
MPDU_MANAGEMENT_SUBTYPE_ACTION = 0xD,
MPDU_MANAGEMENT_SUBTYPE_ACTION_NO_ACK = 0xE,
};
/* 802.11, Section 8.4.1.1 Authentication Algorithm Number field */