mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-19 03:14:05 -05:00
tests: Add a small sleep in FT run_roams()
time.sleep() in run_roams() is required because the target AP sets the key once the station was associated. There are races, when the station processes the (Re)Association Response frame AND the test suite starts FT_DS before the AP processes its local confirmation and thus wpa_auth_sm_event(ASSOC_FT). Therefore, the ActionFrame will be lost, as the AP driver is missing the key. Since this is this speed is highly synthetic, wait a few milliseconds before roaming back. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
9c50a6d3a3
commit
e03822913d
@ -163,6 +163,9 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False,
|
|||||||
dev.scan_for_bss(ap2['bssid'], freq="2412")
|
dev.scan_for_bss(ap2['bssid'], freq="2412")
|
||||||
|
|
||||||
for i in range(0, roams):
|
for i in range(0, roams):
|
||||||
|
# Roaming artificially fast can make data test fail because the key is
|
||||||
|
# set later.
|
||||||
|
time.sleep(0.01)
|
||||||
logger.info("Roam to the second AP")
|
logger.info("Roam to the second AP")
|
||||||
if over_ds:
|
if over_ds:
|
||||||
dev.roam_over_ds(ap2['bssid'], fail_test=fail_test)
|
dev.roam_over_ds(ap2['bssid'], fail_test=fail_test)
|
||||||
@ -178,6 +181,9 @@ def run_roams(dev, apdev, hapd0, hapd1, ssid, passphrase, over_ds=False,
|
|||||||
else:
|
else:
|
||||||
hwsim_utils.test_connectivity(dev, hapd2ap)
|
hwsim_utils.test_connectivity(dev, hapd2ap)
|
||||||
|
|
||||||
|
# Roaming artificially fast can make data test fail because the key is
|
||||||
|
# set later.
|
||||||
|
time.sleep(0.01)
|
||||||
logger.info("Roam back to the first AP")
|
logger.info("Roam back to the first AP")
|
||||||
if over_ds:
|
if over_ds:
|
||||||
dev.roam_over_ds(ap1['bssid'])
|
dev.roam_over_ds(ap1['bssid'])
|
||||||
|
Loading…
Reference in New Issue
Block a user