mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 19:04:02 -05:00
tests: Clear pending monitor events before starting scan
The wait_event() call for scan completion could have processed a previously received event from a prior scan instead of the newly started one. This could result in flush_scan_cache() assuming there are still results in the cache even though the scan request to clear the cache had not even be started yet. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
4131ba5c55
commit
043a29ecc4
@ -1050,6 +1050,8 @@ class WpaSupplicant:
|
|||||||
|
|
||||||
def scan(self, type=None, freq=None, no_wait=False, only_new=False,
|
def scan(self, type=None, freq=None, no_wait=False, only_new=False,
|
||||||
passive=False):
|
passive=False):
|
||||||
|
if not no_wait:
|
||||||
|
self.dump_monitor()
|
||||||
if type:
|
if type:
|
||||||
cmd = "SCAN TYPE=" + type
|
cmd = "SCAN TYPE=" + type
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user