mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 19:04:02 -05:00
tests: Fix hostapd.wait_sta()
wait_event() expects a list of events instead of a single event name. The previous implementation of wait_sta() did not really wait for AP-STA-CONNECT; instead, it returned the next event from hostapd regardless of what that event was. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
3263fca289
commit
c4a9610e8f
@ -263,7 +263,7 @@ class Hostapd:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def wait_sta(self, addr=None, timeout=2):
|
def wait_sta(self, addr=None, timeout=2):
|
||||||
ev = self.wait_event("AP-STA-CONNECT", timeout=timeout)
|
ev = self.wait_event(["AP-STA-CONNECT"], timeout=timeout)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("AP did not report STA connection")
|
raise Exception("AP did not report STA connection")
|
||||||
if addr and addr not in ev:
|
if addr and addr not in ev:
|
||||||
|
Loading…
Reference in New Issue
Block a user