mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
unit: Use new mpdu.h structs
This commit is contained in:
parent
c8854d9a4c
commit
fd661d5e9f
@ -63,7 +63,7 @@ static struct deauthentication_data deauthentication_test_1 = {
|
|||||||
static void deauthentication_test(const void *data)
|
static void deauthentication_test(const void *data)
|
||||||
{
|
{
|
||||||
const struct deauthentication_data *test = data;
|
const struct deauthentication_data *test = data;
|
||||||
const struct mpdu *mpdu;
|
const struct mmpdu_header *mpdu;
|
||||||
|
|
||||||
mpdu = mpdu_validate(test->frame, test->frame_len);
|
mpdu = mpdu_validate(test->frame, test->frame_len);
|
||||||
assert(mpdu);
|
assert(mpdu);
|
||||||
@ -72,15 +72,13 @@ static void deauthentication_test(const void *data)
|
|||||||
assert(mpdu->fc.subtype == MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION);
|
assert(mpdu->fc.subtype == MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION);
|
||||||
assert(mpdu->fc.protocol_version == 0x00);
|
assert(mpdu->fc.protocol_version == 0x00);
|
||||||
|
|
||||||
assert(L_LE16_TO_CPU(mpdu->mgmt_hdr.duration) == test->duration);
|
assert(L_LE16_TO_CPU(mpdu->duration) == test->duration);
|
||||||
assert(!memcmp(mpdu->mgmt_hdr.address_1, test->dest, 6));
|
assert(!memcmp(mpdu->address_1, test->dest, 6));
|
||||||
assert(!memcmp(mpdu->mgmt_hdr.address_2, test->src, 6));
|
assert(!memcmp(mpdu->address_2, test->src, 6));
|
||||||
assert(!memcmp(mpdu->mgmt_hdr.address_3, test->bssid, 6));
|
assert(!memcmp(mpdu->address_3, test->bssid, 6));
|
||||||
|
|
||||||
assert(L_LE16_TO_CPU(mpdu->mgmt_hdr.fragment_number) ==
|
assert(L_LE16_TO_CPU(mpdu->fragment_number) == test->fragment_number);
|
||||||
test->fragment_number);
|
assert(MPDU_SEQUENCE_NUMBER(*mpdu) == test->sequence_number);
|
||||||
assert(MPDU_MGMT_SEQUENCE_NUMBER(mpdu->mgmt_hdr) ==
|
|
||||||
test->sequence_number);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -1912,7 +1912,7 @@ static void verify_deauthenticate(uint32_t ifindex, const uint8_t *aa,
|
|||||||
{
|
{
|
||||||
struct verify_data *data = user_data;
|
struct verify_data *data = user_data;
|
||||||
|
|
||||||
assert(reason_code == MPDU_REASON_CODE_IEEE8021X_FAILED);
|
assert(reason_code == MMPDU_REASON_CODE_IEEE8021X_FAILED);
|
||||||
data->eapol_failed = true;
|
data->eapol_failed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user