tests: Use TYPE=ONLY scan for scan_for_bss

This avoids unexpected connection attempts in cases a matching network
is enabled and there is no existing connection (e.g., when testing with
ENABLE_NETWORK no-connect option).

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-09-27 16:11:28 +03:00
parent bf700cc3d2
commit bbf20ca265

View file

@ -718,7 +718,7 @@ class WpaSupplicant:
if not force_scan and self.get_bss(bssid) is not None:
return
for i in range(0, 10):
self.scan(freq=freq)
self.scan(freq=freq, type="ONLY")
if self.get_bss(bssid) is not None:
return
raise Exception("Could not find BSS " + bssid + " in scan")