mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 19:04:02 -05:00
tests: Pass apdev to HostapdGlobal()
This can be used to work with remote hosts. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
1728a2e73c
commit
dc6342de92
@ -338,7 +338,7 @@ def test_ap_bss_add_many(dev, apdev):
|
|||||||
finally:
|
finally:
|
||||||
dev[0].request("SCAN_INTERVAL 5")
|
dev[0].request("SCAN_INTERVAL 5")
|
||||||
ifname = apdev[0]['ifname']
|
ifname = apdev[0]['ifname']
|
||||||
hapd = hostapd.HostapdGlobal()
|
hapd = hostapd.HostapdGlobal(apdev[0])
|
||||||
hapd.flush()
|
hapd.flush()
|
||||||
for i in range(16):
|
for i in range(16):
|
||||||
ifname2 = ifname + '-' + str(i)
|
ifname2 = ifname + '-' + str(i)
|
||||||
|
@ -1732,7 +1732,7 @@ def test_ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res(dev, apdev):
|
|||||||
"ignore_broadcast_ssid": "1" })
|
"ignore_broadcast_ssid": "1" })
|
||||||
dev[0].scan_for_bss(bssid, freq=2412)
|
dev[0].scan_for_bss(bssid, freq=2412)
|
||||||
hapd.disable()
|
hapd.disable()
|
||||||
hapd_global = hostapd.HostapdGlobal()
|
hapd_global = hostapd.HostapdGlobal(apdev[0])
|
||||||
hapd_global.flush()
|
hapd_global.flush()
|
||||||
hapd_global.remove(apdev[0]['ifname'])
|
hapd_global.remove(apdev[0]['ifname'])
|
||||||
|
|
||||||
@ -2898,7 +2898,7 @@ def test_ap_hs20_hidden_ssid_in_scan_res(dev, apdev):
|
|||||||
"ignore_broadcast_ssid": "1" })
|
"ignore_broadcast_ssid": "1" })
|
||||||
dev[0].scan_for_bss(bssid, freq=2412)
|
dev[0].scan_for_bss(bssid, freq=2412)
|
||||||
hapd.disable()
|
hapd.disable()
|
||||||
hapd_global = hostapd.HostapdGlobal()
|
hapd_global = hostapd.HostapdGlobal(apdev[0])
|
||||||
hapd_global.flush()
|
hapd_global.flush()
|
||||||
hapd_global.remove(apdev[0]['ifname'])
|
hapd_global.remove(apdev[0]['ifname'])
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ def test_hapd_ctrl_global(dev, apdev):
|
|||||||
params = { "ssid": ssid }
|
params = { "ssid": ssid }
|
||||||
ifname = apdev[0]['ifname']
|
ifname = apdev[0]['ifname']
|
||||||
hapd = hostapd.add_ap(apdev[0], params)
|
hapd = hostapd.add_ap(apdev[0], params)
|
||||||
hapd_global = hostapd.HostapdGlobal()
|
hapd_global = hostapd.HostapdGlobal(apdev[0])
|
||||||
res = hapd_global.request("IFNAME=" + ifname + " PING")
|
res = hapd_global.request("IFNAME=" + ifname + " PING")
|
||||||
if "PONG" not in res:
|
if "PONG" not in res:
|
||||||
raise Exception("Could not ping hostapd interface " + ifname + " via global control interface")
|
raise Exception("Could not ping hostapd interface " + ifname + " via global control interface")
|
||||||
|
@ -756,7 +756,7 @@ def test_pmksa_cache_size_limit(dev, apdev):
|
|||||||
_test_pmksa_cache_size_limit(dev, apdev)
|
_test_pmksa_cache_size_limit(dev, apdev)
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
hapd = hostapd.HostapdGlobal()
|
hapd = hostapd.HostapdGlobal(apdev[0])
|
||||||
hapd.flush()
|
hapd.flush()
|
||||||
hapd.remove(apdev[0]['ifname'])
|
hapd.remove(apdev[0]['ifname'])
|
||||||
except:
|
except:
|
||||||
@ -791,7 +791,7 @@ def _test_pmksa_cache_size_limit(dev, apdev):
|
|||||||
elif i + 1 != entries:
|
elif i + 1 != entries:
|
||||||
raise Exception("Unexpected number of PMKSA entries")
|
raise Exception("Unexpected number of PMKSA entries")
|
||||||
|
|
||||||
hapd = hostapd.HostapdGlobal()
|
hapd = hostapd.HostapdGlobal(apdev[0])
|
||||||
hapd.flush()
|
hapd.flush()
|
||||||
hapd.remove(apdev[0]['ifname'])
|
hapd.remove(apdev[0]['ifname'])
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ def test_rfkill_hostapd(dev, apdev):
|
|||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
hapd.disable()
|
hapd.disable()
|
||||||
|
|
||||||
hglobal = HostapdGlobal()
|
hglobal = HostapdGlobal(apdev[0])
|
||||||
hglobal.flush()
|
hglobal.flush()
|
||||||
hglobal.remove(apdev[0]['ifname'])
|
hglobal.remove(apdev[0]['ifname'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user