mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
driver_test: Added support for testing WPS without use_mlme
This commit is contained in:
parent
eef7d7a138
commit
d9f2b1c382
@ -449,9 +449,15 @@ static int test_driver_new_sta(struct test_driver_data *drv,
|
|||||||
if (sta == NULL)
|
if (sta == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
sta->flags &= ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS);
|
||||||
|
|
||||||
if (hapd->conf->wpa) {
|
if (hapd->conf->wpa) {
|
||||||
if (ie == NULL || ielen == 0) {
|
if (ie == NULL || ielen == 0) {
|
||||||
|
if (hapd->conf->wps_state) {
|
||||||
|
sta->flags |= WLAN_STA_WPS;
|
||||||
|
goto skip_wpa_check;
|
||||||
|
}
|
||||||
|
|
||||||
printf("test_driver: no IE from STA\n");
|
printf("test_driver: no IE from STA\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -471,6 +477,7 @@ static int test_driver_new_sta(struct test_driver_data *drv,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
skip_wpa_check:
|
||||||
|
|
||||||
new_assoc = (sta->flags & WLAN_STA_ASSOC) == 0;
|
new_assoc = (sta->flags & WLAN_STA_ASSOC) == 0;
|
||||||
sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC;
|
sta->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC;
|
||||||
|
Loading…
Reference in New Issue
Block a user