tests: Pass full apdev to add_ap() function (1)
Pass the full apdev to the add_ap() function instead of just ifname. This allows us to handle also remote hosts while we can check apdev['hostname'], apdev['port']. This step (1) converts the cases where apdev[#]['ifname'] was used as the argument to hostapd.add_ap(). Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
78b8319317
commit
8b8a1864ff
60 changed files with 1083 additions and 1083 deletions
|
@ -64,7 +64,7 @@ def test_ap_acs(dev, apdev):
|
|||
force_prev_ap_on_24g(apdev[0])
|
||||
params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
|
||||
params['channel'] = '0'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
|
||||
freq = hapd.get_status_field("freq")
|
||||
|
@ -79,7 +79,7 @@ def test_ap_acs_chanlist(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
|
||||
params['channel'] = '0'
|
||||
params['chanlist'] = '1 6 11'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
|
||||
freq = hapd.get_status_field("freq")
|
||||
|
@ -115,7 +115,7 @@ def test_ap_acs_40mhz(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
|
||||
params['channel'] = '0'
|
||||
params['ht_capab'] = '[HT40+]'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
|
||||
freq = hapd.get_status_field("freq")
|
||||
|
@ -136,7 +136,7 @@ def test_ap_acs_5ghz(dev, apdev):
|
|||
params['hw_mode'] = 'a'
|
||||
params['channel'] = '0'
|
||||
params['country_code'] = 'US'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
freq = hapd.get_status_field("freq")
|
||||
if int(freq) < 5000:
|
||||
|
@ -161,7 +161,7 @@ def test_ap_acs_5ghz_40mhz(dev, apdev):
|
|||
params['channel'] = '0'
|
||||
params['ht_capab'] = '[HT40+]'
|
||||
params['country_code'] = 'US'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
freq = hapd.get_status_field("freq")
|
||||
if int(freq) < 5000:
|
||||
|
@ -192,7 +192,7 @@ def test_ap_acs_vht(dev, apdev):
|
|||
params['country_code'] = 'US'
|
||||
params['ieee80211ac'] = '1'
|
||||
params['vht_oper_chwidth'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
freq = hapd.get_status_field("freq")
|
||||
if int(freq) < 5000:
|
||||
|
@ -217,7 +217,7 @@ def test_ap_acs_bias(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
|
||||
params['channel'] = '0'
|
||||
params['acs_chan_bias'] = '1:0.8 3:1.2 6:0.7 11:0.8'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
|
||||
freq = hapd.get_status_field("freq")
|
||||
|
|
|
@ -78,7 +78,7 @@ def test_ap_cipher_tkip_countermeasures_ap(dev, apdev):
|
|||
"wpa": "1",
|
||||
"wpa_key_mgmt": "WPA-PSK",
|
||||
"wpa_pairwise": "TKIP" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("tkip-countermeasures", psk="12345678",
|
||||
pairwise="TKIP", group="TKIP", scan_freq="2412")
|
||||
|
@ -108,7 +108,7 @@ def test_ap_cipher_tkip_countermeasures_sta(dev, apdev):
|
|||
"wpa": "1",
|
||||
"wpa_key_mgmt": "WPA-PSK",
|
||||
"wpa_pairwise": "TKIP" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
testfile = "/sys/kernel/debug/ieee80211/%s/netdev:%s/tkip_mic_test" % (hapd.get_driver_status_field("phyname"), apdev[0]['ifname'])
|
||||
if not os.path.exists(testfile):
|
||||
|
@ -161,7 +161,7 @@ def test_ap_cipher_mixed_wpa_wpa2(dev, apdev):
|
|||
"wpa_key_mgmt": "WPA-PSK",
|
||||
"rsn_pairwise": "CCMP",
|
||||
"wpa_pairwise": "TKIP" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, proto="WPA2",
|
||||
pairwise="CCMP", group="TKIP", scan_freq="2412")
|
||||
status = dev[0].get_status()
|
||||
|
|
|
@ -16,7 +16,7 @@ def connect(dev, apdev, **kwargs):
|
|||
params = { "ssid": "ap-csa",
|
||||
"channel": "1" }
|
||||
params.update(kwargs)
|
||||
ap = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
ap = hostapd.add_ap(apdev[0], params)
|
||||
dev.connect("ap-csa", key_mgmt="NONE", scan_freq="2412")
|
||||
return ap
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ def test_ap_change_ssid(dev, apdev):
|
|||
"""Dynamic SSID change with hostapd and WPA2-PSK"""
|
||||
params = hostapd.wpa2_params(ssid="test-wpa2-psk-start",
|
||||
passphrase="12345678")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
id = dev[0].connect("test-wpa2-psk-start", psk="12345678",
|
||||
scan_freq="2412")
|
||||
dev[0].request("DISCONNECT")
|
||||
|
@ -427,7 +427,7 @@ def hapd_bss_out_of_mem(hapd, phy, confname, count, func):
|
|||
|
||||
def test_ap_bss_add_out_of_memory(dev, apdev):
|
||||
"""Running out of memory while adding a BSS"""
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open" })
|
||||
hapd2 = hostapd.add_ap(apdev[1], { "ssid": "open" })
|
||||
|
||||
ifname1 = apdev[0]['ifname']
|
||||
ifname2 = apdev[0]['ifname'] + '-2'
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -154,9 +154,9 @@ def test_ap_ft(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase)
|
||||
if "[WPA2-FT/PSK-CCMP]" not in dev[0].request("SCAN_RESULTS"):
|
||||
|
@ -168,9 +168,9 @@ def test_ap_ft_many(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, roams=50)
|
||||
|
||||
|
@ -180,13 +180,13 @@ def test_ap_ft_mixed(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(rsn=False, ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
vals = key_mgmt.split(' ')
|
||||
if vals[0] != "WPA-PSK" or vals[1] != "FT-PSK":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
params = ft_params2(rsn=False, ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd, hapd1, ssid, passphrase)
|
||||
|
||||
|
@ -197,10 +197,10 @@ def test_ap_ft_pmf(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase)
|
||||
|
||||
|
@ -210,9 +210,9 @@ def test_ap_ft_over_ds(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True)
|
||||
check_mib(dev[0], [ ("dot11RSNAAuthenticationSuiteRequested", "00-0f-ac-4"),
|
||||
|
@ -224,9 +224,9 @@ def test_ap_ft_over_ds_many(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
|
||||
roams=50)
|
||||
|
@ -237,7 +237,7 @@ def test_ap_ft_over_ds_unknown_target(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -249,9 +249,9 @@ def test_ap_ft_over_ds_unexpected(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -350,10 +350,10 @@ def test_ap_ft_pmf_over_ds(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True)
|
||||
|
||||
|
@ -364,10 +364,10 @@ def test_ap_ft_over_ds_pull(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True)
|
||||
|
||||
|
@ -380,10 +380,10 @@ def test_ap_ft_sae(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_key_mgmt'] = "FT-SAE"
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_key_mgmt'] = "FT-SAE"
|
||||
hapd = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[1], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "FT-SAE":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -400,10 +400,10 @@ def test_ap_ft_sae_over_ds(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_key_mgmt'] = "FT-SAE"
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_key_mgmt'] = "FT-SAE"
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].request("SET sae_groups ")
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, sae=True,
|
||||
|
@ -419,7 +419,7 @@ def test_ap_ft_eap(dev, apdev):
|
|||
params['wpa_key_mgmt'] = "FT-EAP"
|
||||
params["ieee8021x"] = "1"
|
||||
params = dict(radius.items() + params.items())
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "FT-EAP":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -427,7 +427,7 @@ def test_ap_ft_eap(dev, apdev):
|
|||
params['wpa_key_mgmt'] = "FT-EAP"
|
||||
params["ieee8021x"] = "1"
|
||||
params = dict(radius.items() + params.items())
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd, hapd1, ssid, passphrase, eap=True)
|
||||
if "[WPA2-FT/EAP-CCMP]" not in dev[0].request("SCAN_RESULTS"):
|
||||
|
@ -461,7 +461,7 @@ def test_ap_ft_eap_pull(dev, apdev):
|
|||
params["ieee8021x"] = "1"
|
||||
params["pmk_r1_push"] = "0"
|
||||
params = dict(radius.items() + params.items())
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "FT-EAP":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -470,7 +470,7 @@ def test_ap_ft_eap_pull(dev, apdev):
|
|||
params["ieee8021x"] = "1"
|
||||
params["pmk_r1_push"] = "0"
|
||||
params = dict(radius.items() + params.items())
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd, hapd1, ssid, passphrase, eap=True)
|
||||
|
||||
|
@ -481,10 +481,10 @@ def test_ap_ft_mismatching_rrb_key_push(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2_incorrect_rrb_key(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
|
||||
fail_test=True)
|
||||
|
@ -496,10 +496,10 @@ def test_ap_ft_mismatching_rrb_key_pull(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2_incorrect_rrb_key(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
|
||||
fail_test=True)
|
||||
|
@ -512,13 +512,13 @@ def test_ap_ft_mismatching_r0kh_id_pull(dev, apdev):
|
|||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
params["nas_identifier"] = "nas0.w1.fi"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
||||
dev[0].roam_over_ds(apdev[1]['bssid'], fail_test=True)
|
||||
|
@ -530,10 +530,10 @@ def test_ap_ft_mismatching_rrb_r0kh_push(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2_r0kh_mismatch(ssid=ssid, passphrase=passphrase)
|
||||
params["ieee80211w"] = "2";
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
|
||||
fail_test=True)
|
||||
|
@ -545,10 +545,10 @@ def test_ap_ft_mismatching_rrb_r0kh_pull(dev, apdev):
|
|||
|
||||
params = ft_params1_r0kh_mismatch(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params["pmk_r1_push"] = "0"
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
|
||||
fail_test=True)
|
||||
|
@ -560,7 +560,7 @@ def test_ap_ft_gtk_rekey(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_group_rekey'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
ieee80211w="1", scan_freq="2412")
|
||||
|
@ -572,7 +572,7 @@ def test_ap_ft_gtk_rekey(dev, apdev):
|
|||
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_group_rekey'] = '1'
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
||||
dev[0].roam(apdev[1]['bssid'])
|
||||
|
@ -592,9 +592,9 @@ def test_ft_psk_key_lifetime_in_memory(dev, apdev, params):
|
|||
psk = '93c90846ff67af9037ed83fb72b63dbeddaa81d47f926c20909b5886f1d9358d'
|
||||
pmk = binascii.unhexlify(psk)
|
||||
p = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], p)
|
||||
hapd0 = hostapd.add_ap(apdev[0], p)
|
||||
p = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], p)
|
||||
hapd1 = hostapd.add_ap(apdev[1], p)
|
||||
|
||||
pid = find_wpas_process(dev[0])
|
||||
|
||||
|
@ -700,12 +700,12 @@ def test_ap_ft_invalid_resp(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
tests = [
|
||||
# Various IEs for test coverage. The last one is FTIE with invalid
|
||||
|
@ -760,10 +760,10 @@ def test_ap_ft_gcmp_256(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params['rsn_pairwise'] = "GCMP-256"
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params['rsn_pairwise'] = "GCMP-256"
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase,
|
||||
pairwise_cipher="GCMP-256", group_cipher="GCMP-256")
|
||||
|
@ -775,9 +775,9 @@ def test_ap_ft_oom(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -800,7 +800,7 @@ def test_ap_ft_over_ds_proto(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
||||
|
@ -814,7 +814,7 @@ def test_ap_ft_over_ds_proto(dev, apdev):
|
|||
hapd0.mgmt_tx(msg)
|
||||
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
||||
hapd0.set("ext_mgmt_frame_handling", "1")
|
||||
hapd0.dump_monitor()
|
||||
|
@ -851,7 +851,7 @@ def test_ap_ft_rrb(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -946,7 +946,7 @@ def test_rsn_ie_proto_ft_psk_sta(dev, apdev):
|
|||
params["ieee80211w"] = "1";
|
||||
# This is the RSN element used normally by hostapd
|
||||
params['own_ie_override'] = '30140100000fac040100000fac040100000fac048c00' + '3603a1b201'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
id = dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
ieee80211w="1", scan_freq="2412",
|
||||
pairwise="CCMP", group="CCMP")
|
||||
|
@ -1010,9 +1010,9 @@ def test_ap_ft_ptk_rekey(dev, apdev):
|
|||
passphrase="12345678"
|
||||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, ptk_rekey="1")
|
||||
|
||||
|
@ -1036,10 +1036,10 @@ def test_ap_ft_ptk_rekey_ap(dev, apdev):
|
|||
|
||||
params = ft_params1(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_ptk_rekey'] = '2'
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_ptk_rekey'] = '2'
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase)
|
||||
|
||||
|
@ -1066,12 +1066,12 @@ def test_ap_ft_internal_rrb_check(dev, apdev):
|
|||
params['wpa_key_mgmt'] = "FT-EAP"
|
||||
params["ieee8021x"] = "1"
|
||||
params = dict(radius.items() + params.items())
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "FT-EAP":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], { "ssid" : ssid })
|
||||
hapd1 = hostapd.add_ap(apdev[1], { "ssid" : ssid })
|
||||
|
||||
# Connect to WPA enabled AP
|
||||
dev[0].connect(ssid, key_mgmt="FT-EAP", proto="WPA2", ieee80211w="1",
|
||||
|
|
|
@ -168,13 +168,13 @@ def test_ap_anqp_sharing(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['nai_realm'] = [ "0,example.com,13[5:6],21[2:4][5:7]" ]
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com", 'username': "test",
|
||||
|
@ -219,7 +219,7 @@ def test_ap_nai_home_realm_query(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,13[5:6],21[2:4][5:7]",
|
||||
"0,another.example.org" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan(freq="2412")
|
||||
dev[0].request("HS20_GET_NAI_HOME_REALM_LIST " + bssid + " realm=example.com")
|
||||
|
@ -298,7 +298,7 @@ def _test_ap_interworking_scan_filtering(dev, apdev):
|
|||
ssid = "test-hs20-ap1"
|
||||
params['ssid'] = ssid
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params()
|
||||
|
@ -308,7 +308,7 @@ def _test_ap_interworking_scan_filtering(dev, apdev):
|
|||
params['access_network_type'] = "1"
|
||||
del params['venue_group']
|
||||
del params['venue_type']
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
|
||||
|
@ -373,7 +373,7 @@ def test_ap_hs20_select(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com", 'username': "test",
|
||||
|
@ -399,7 +399,7 @@ def test_ap_hs20_select(dev, apdev):
|
|||
params['nai_realm'] = [ "0,example.org,21" ]
|
||||
params['hessid'] = bssid2
|
||||
params['domain_name'] = "example.org"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
dev[0].remove_cred(id)
|
||||
id = dev[0].add_cred_values({ 'realm': "example.org", 'username': "test",
|
||||
'password': "secret",
|
||||
|
@ -448,7 +448,7 @@ def test_ap_hs20_ext_sim(dev, apdev):
|
|||
params['hessid'] = bssid
|
||||
params['anqp_3gpp_cell_net'] = "232,01"
|
||||
params['domain_name'] = "wlan.mnc001.mcc232.3gppnetwork.org"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
try:
|
||||
|
@ -468,7 +468,7 @@ def test_ap_hs20_ext_sim_roaming(dev, apdev):
|
|||
params['hessid'] = bssid
|
||||
params['anqp_3gpp_cell_net'] = "244,91;310,026;232,01;234,56"
|
||||
params['domain_name'] = "wlan.mnc091.mcc244.3gppnetwork.org"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
try:
|
||||
|
@ -487,7 +487,7 @@ def test_ap_hs20_username(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['disable_dgaf'] = '1'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -517,7 +517,7 @@ def test_ap_hs20_connect_api(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['disable_dgaf'] = '1'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -545,7 +545,7 @@ def test_ap_hs20_auto_interworking(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['disable_dgaf'] = '1'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable(auto_interworking=True)
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -565,7 +565,7 @@ def test_ap_hs20_auto_interworking(dev, apdev):
|
|||
|
||||
def test_ap_hs20_auto_interworking_no_match(dev, apdev):
|
||||
"""Hotspot 2.0 connection with auto_interworking=1 and no matching network"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "mismatch" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "mismatch" })
|
||||
|
||||
dev[0].hs20_enable(auto_interworking=True)
|
||||
id = dev[0].connect("mismatch", psk="12345678", scan_freq="2412",
|
||||
|
@ -606,7 +606,7 @@ def test_ap_hs20_auto_interworking_no_cred_match(dev, apdev):
|
|||
"""Hotspot 2.0 connection with auto_interworking=1 but no cred match"""
|
||||
bssid = apdev[0]['bssid']
|
||||
params = { "ssid": "test" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable(auto_interworking=True)
|
||||
dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -643,7 +643,7 @@ def test_ap_hs20_eap_unknown(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = "0,example.com,99"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values(default_cred())
|
||||
|
@ -668,7 +668,7 @@ def test_ap_hs20_eap_peap_unknown(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = "0,example.com,25[3:99]"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values(default_cred())
|
||||
|
@ -694,7 +694,7 @@ def test_ap_hs20_eap_ttls_eap_unknown(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = "0,example.com,21[3:99]"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values(default_cred())
|
||||
|
@ -705,7 +705,7 @@ def test_ap_hs20_eap_ttls_eap_unsupported(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = "0,example.com,21[3:5]"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values(default_cred())
|
||||
|
@ -716,7 +716,7 @@ def test_ap_hs20_eap_ttls_unknown(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = "0,example.com,21[2:5]"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values(default_cred())
|
||||
|
@ -737,7 +737,7 @@ def test_ap_hs20_eap_tls(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,13[5:6]" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -753,7 +753,7 @@ def test_ap_hs20_eap_cert_unknown(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,99[5:6]" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -768,7 +768,7 @@ def test_ap_hs20_eap_cert_unsupported(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,21[5:6]" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -782,7 +782,7 @@ def test_ap_hs20_eap_invalid_cred(dev, apdev):
|
|||
"""Hotspot 2.0 connection with invalid cred configuration"""
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -796,7 +796,7 @@ def test_ap_hs20_nai_realms(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['nai_realm'] = [ "0,no.match.here;example.com;no.match.here.either,21[2:1][5:7]" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -813,7 +813,7 @@ def test_ap_hs20_roaming_consortium(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
for consortium in [ "112233", "1020304050", "010203040506", "fedcba" ]:
|
||||
|
@ -842,7 +842,7 @@ def test_ap_hs20_username_roaming(dev, apdev):
|
|||
"0,another.example.com" ]
|
||||
params['domain_name'] = "another.example.com"
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "roaming.example.com",
|
||||
|
@ -860,7 +860,7 @@ def test_ap_hs20_username_unknown(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -878,7 +878,7 @@ def test_ap_hs20_username_unknown2(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
del params['domain_name']
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -896,7 +896,7 @@ def test_ap_hs20_gas_while_associated(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -920,13 +920,13 @@ def test_ap_hs20_gas_with_another_ap_while_associated(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid2
|
||||
params['nai_realm'] = [ "0,no-match.example.org,13[5:6],21[2:4][5:7]" ]
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -964,13 +964,13 @@ def _test_ap_hs20_gas_while_associated_with_pmf(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid2
|
||||
params['nai_realm'] = [ "0,no-match.example.org,13[5:6],21[2:4][5:7]" ]
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].request("SET pmf 2")
|
||||
|
@ -1001,13 +1001,13 @@ def _test_ap_hs20_gas_with_another_ap_while_using_pmf(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid2
|
||||
params['nai_realm'] = [ "0,no-match.example.org,13[5:6],21[2:4][5:7]" ]
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].request("SET pmf 2")
|
||||
|
@ -1040,7 +1040,7 @@ def test_ap_hs20_gas_frag_while_associated(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
hapd.set("gas_frag_limit", "50")
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ def test_ap_hs20_multiple_connects(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
@ -1106,7 +1106,7 @@ def test_ap_hs20_disallow_aps(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
@ -1203,12 +1203,12 @@ def test_ap_hs20_prefer_home(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = hs20_ap_params()
|
||||
params['domain_name'] = "example.org"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = hs20_ap_params()
|
||||
params['ssid'] = "test-hs20-other"
|
||||
params['domain_name'] = "example.com"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
values = default_cred()
|
||||
values['domain'] = "example.com"
|
||||
|
@ -1220,12 +1220,12 @@ def test_ap_hs20_req_roaming_consortium(dev, apdev):
|
|||
"""Hotspot 2.0 required roaming consortium"""
|
||||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = hs20_ap_params()
|
||||
params['ssid'] = "test-hs20-other"
|
||||
params['roaming_consortium'] = [ "223344" ]
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
values = default_cred()
|
||||
values['required_roaming_consortium'] = "223344"
|
||||
|
@ -1247,13 +1247,13 @@ def test_ap_hs20_excluded_ssid(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['roaming_consortium'] = [ "223344" ]
|
||||
params['anqp_3gpp_cell_net'] = "555,444"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = hs20_ap_params()
|
||||
params['ssid'] = "test-hs20-other"
|
||||
params['roaming_consortium'] = [ "223344" ]
|
||||
params['anqp_3gpp_cell_net'] = "555,444"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
values = default_cred()
|
||||
values['excluded_ssid'] = "test-hs20"
|
||||
|
@ -1291,7 +1291,7 @@ def test_ap_hs20_roam_to_higher_prio(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20-visited")
|
||||
params['domain_name'] = "visited.example.org"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -1308,7 +1308,7 @@ def test_ap_hs20_roam_to_higher_prio(dev, apdev):
|
|||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20-home")
|
||||
params['domain_name'] = "example.com"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid2, freq="2412", force_scan=True)
|
||||
dev[0].request("INTERWORKING_SELECT auto freq=2412")
|
||||
|
@ -1330,7 +1330,7 @@ def test_ap_hs20_domain_suffix_match_full(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -1361,7 +1361,7 @@ def test_ap_hs20_domain_suffix_match(dev, apdev):
|
|||
check_domain_match_full(dev[0])
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -1379,12 +1379,12 @@ def test_ap_hs20_roaming_partner_preference(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = hs20_ap_params()
|
||||
params['domain_name'] = "roaming.example.org"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = hs20_ap_params()
|
||||
params['ssid'] = "test-hs20-other"
|
||||
params['domain_name'] = "roaming.example.net"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
logger.info("Verify default vs. specified preference")
|
||||
values = default_cred()
|
||||
|
@ -1404,12 +1404,12 @@ def test_ap_hs20_max_bss_load(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = hs20_ap_params()
|
||||
params['bss_load_test'] = "12:200:20000"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = hs20_ap_params()
|
||||
params['ssid'] = "test-hs20-other"
|
||||
params['bss_load_test'] = "5:20:10000"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
logger.info("Verify maximum BSS load constraint")
|
||||
values = default_cred()
|
||||
|
@ -1440,11 +1440,11 @@ def test_ap_hs20_max_bss_load2(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = hs20_ap_params()
|
||||
params['bss_load_test'] = "12:200:20000"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = hs20_ap_params()
|
||||
params['ssid'] = "test-hs20-other"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
logger.info("Verify maximum BSS load constraint with AP advertisement")
|
||||
values = default_cred()
|
||||
|
@ -1474,7 +1474,7 @@ def _test_ap_hs20_multi_cred_sp_prio(dev, apdev):
|
|||
params['hessid'] = bssid
|
||||
del params['domain_name']
|
||||
params['anqp_3gpp_cell_net'] = "232,01"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
@ -1519,7 +1519,7 @@ def _test_ap_hs20_multi_cred_sp_prio2(dev, apdev):
|
|||
del params['nai_realm']
|
||||
del params['domain_name']
|
||||
params['anqp_3gpp_cell_net'] = "232,01"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params()
|
||||
|
@ -1527,7 +1527,7 @@ def _test_ap_hs20_multi_cred_sp_prio2(dev, apdev):
|
|||
params['hessid'] = bssid2
|
||||
del params['domain_name']
|
||||
del params['anqp_3gpp_cell_net']
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].request("SET external_sim 1")
|
||||
|
@ -1585,7 +1585,7 @@ def test_ap_hs20_req_conn_capab(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
@ -1618,7 +1618,7 @@ def test_ap_hs20_req_conn_capab(dev, apdev):
|
|||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20b")
|
||||
params['hs20_conn_capab'] = [ "1:0:2", "6:22:1", "17:5060:0", "50:0:1" ]
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].remove_cred(id)
|
||||
values = conn_capab_cred(domain="example.org", req_conn_capab="50")
|
||||
|
@ -1642,12 +1642,12 @@ def test_ap_hs20_req_conn_capab_and_roaming_partner_preference(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['domain_name'] = "roaming.example.org"
|
||||
params['hs20_conn_capab'] = [ "1:0:2", "6:22:1", "17:5060:0", "50:0:1" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20-b")
|
||||
params['domain_name'] = "roaming.example.net"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
values = default_cred()
|
||||
values['roaming_partner'] = "roaming.example.net,1,127,*"
|
||||
|
@ -1692,7 +1692,7 @@ def test_ap_hs20_min_bandwidth_home(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
@ -1719,7 +1719,7 @@ def test_ap_hs20_min_bandwidth_home(dev, apdev):
|
|||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20-b")
|
||||
params['hs20_wan_metrics'] = "01:8000:1000:1:1:3000"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
check_auto_select(dev[0], bssid2)
|
||||
|
||||
|
@ -1728,8 +1728,8 @@ def test_ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'secret',
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'secret',
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
hapd.disable()
|
||||
hapd_global = hostapd.HostapdGlobal()
|
||||
|
@ -1737,7 +1737,7 @@ def test_ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res(dev, apdev):
|
|||
hapd_global.remove(apdev[0]['ifname'])
|
||||
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
@ -1764,7 +1764,7 @@ def test_ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res(dev, apdev):
|
|||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20-b")
|
||||
params['hs20_wan_metrics'] = "01:8000:1000:1:1:3000"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
check_auto_select(dev[0], bssid2)
|
||||
|
||||
|
@ -1775,7 +1775,7 @@ def test_ap_hs20_min_bandwidth_roaming(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
@ -1802,7 +1802,7 @@ def test_ap_hs20_min_bandwidth_roaming(dev, apdev):
|
|||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20-b")
|
||||
params['hs20_wan_metrics'] = "01:8000:1000:1:1:3000"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
check_auto_select(dev[0], bssid2)
|
||||
|
||||
|
@ -1813,12 +1813,12 @@ def test_ap_hs20_min_bandwidth_and_roaming_partner_preference(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['domain_name'] = "roaming.example.org"
|
||||
params['hs20_wan_metrics'] = "01:8000:1000:1:1:3000"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20-b")
|
||||
params['domain_name'] = "roaming.example.net"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
values = default_cred()
|
||||
values['roaming_partner'] = "roaming.example.net,1,127,*"
|
||||
|
@ -1836,7 +1836,7 @@ def test_ap_hs20_min_bandwidth_no_wan_metrics(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
del params['hs20_wan_metrics']
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
@ -1920,7 +1920,7 @@ def _test_ap_hs20_deauth_req_from_radius(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,21[2:4]" ]
|
||||
params['hs20_deauth_req_timeout'] = "2"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET pmf 2")
|
||||
dev[0].hs20_enable()
|
||||
|
@ -1948,7 +1948,7 @@ def _test_ap_hs20_remediation_required(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,21[2:4]" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET pmf 1")
|
||||
dev[0].hs20_enable()
|
||||
|
@ -1976,7 +1976,7 @@ def _test_ap_hs20_remediation_required_ctrl(dev, apdev):
|
|||
addr = dev[0].own_addr()
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,21[2:4]" ]
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET pmf 1")
|
||||
dev[0].hs20_enable()
|
||||
|
@ -2017,7 +2017,7 @@ def _test_ap_hs20_session_info(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,21[2:4]" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET pmf 1")
|
||||
dev[0].hs20_enable()
|
||||
|
@ -2045,7 +2045,7 @@ def test_ap_hs20_osen(dev, apdev):
|
|||
'auth_server_addr': "127.0.0.1",
|
||||
'auth_server_port': "1812",
|
||||
'auth_server_shared_secret': "radius" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[1].connect("osen", key_mgmt="NONE", scan_freq="2412",
|
||||
wait_connect=False)
|
||||
|
@ -2080,7 +2080,7 @@ def test_ap_hs20_network_preference(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
@ -2103,7 +2103,7 @@ def test_ap_hs20_network_preference(dev, apdev):
|
|||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hostapd.wpa2_params(ssid="home", passphrase="12345678")
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid2, freq="2412")
|
||||
dev[0].request("INTERWORKING_SELECT auto freq=2412")
|
||||
|
@ -2121,7 +2121,7 @@ def test_ap_hs20_network_preference2(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hostapd.wpa2_params(ssid="home", passphrase="12345678")
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
@ -2144,7 +2144,7 @@ def test_ap_hs20_network_preference2(dev, apdev):
|
|||
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
dev[0].request("INTERWORKING_SELECT auto freq=2412")
|
||||
|
@ -2162,12 +2162,12 @@ def test_ap_hs20_network_preference3(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20b")
|
||||
params['nai_realm'] = "0,example.org,13[5:6],21[2:4][5:7]"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
@ -2203,14 +2203,14 @@ def test_ap_hs20_network_preference4(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20b")
|
||||
params['hessid'] = bssid2
|
||||
params['anqp_3gpp_cell_net'] = "555,444"
|
||||
params['domain_name'] = "wlan.mnc444.mcc555.3gppnetwork.org"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
@ -2246,7 +2246,7 @@ def test_ap_hs20_interworking_select_blocking_scan(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
@ -2272,7 +2272,7 @@ def test_ap_hs20_fetch_osu(dev, apdev):
|
|||
params['osu_icon'] = "w1fi_logo"
|
||||
params['osu_service_desc'] = [ "eng:Example services", "fin:Esimerkkipalveluja" ]
|
||||
params['osu_server_uri'] = "https://example.com/osu/"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid2 = apdev[1]['bssid']
|
||||
params = hs20_ap_params(ssid="test-hs20b")
|
||||
|
@ -2285,7 +2285,7 @@ def test_ap_hs20_fetch_osu(dev, apdev):
|
|||
params['osu_icon'] = "w1fi_logo"
|
||||
params['osu_service_desc'] = [ "eng:Example services2", "fin:Esimerkkipalveluja2" ]
|
||||
params['osu_server_uri'] = "https://example.org/osu/"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
with open("w1fi_logo.png", "r") as f:
|
||||
orig_logo = f.read()
|
||||
|
@ -2436,7 +2436,7 @@ def test_ap_hs20_req_hs20_icon(dev, apdev):
|
|||
params['osu_icon'] = [ "w1fi_logo", "w1fi_logo2" ]
|
||||
params['osu_service_desc'] = [ "eng:Example services", "fin:Esimerkkipalveluja" ]
|
||||
params['osu_server_uri'] = "https://example.com/osu/"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
||||
|
@ -2488,7 +2488,7 @@ def test_ap_hs20_req_hs20_icon_parallel(dev, apdev):
|
|||
params['osu_icon'] = [ "w1fi_logo", "w1fi_logo2" ]
|
||||
params['osu_service_desc'] = [ "eng:Example services", "fin:Esimerkkipalveluja" ]
|
||||
params['osu_server_uri'] = "https://example.com/osu/"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq="2412")
|
||||
|
||||
|
@ -2539,7 +2539,7 @@ def test_ap_hs20_fetch_osu_stop(dev, apdev):
|
|||
params['osu_icon'] = "w1fi_logo"
|
||||
params['osu_service_desc'] = [ "eng:Example services", "fin:Esimerkkipalveluja" ]
|
||||
params['osu_server_uri'] = "https://example.com/osu/"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dir = "/tmp/osu-fetch"
|
||||
|
@ -2623,7 +2623,7 @@ def test_ap_hs20_ft(dev, apdev):
|
|||
params['r1_key_holder'] = "000102030405"
|
||||
params["mobility_domain"] = "a1b2"
|
||||
params["reassociation_deadline"] = "1000"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -2667,12 +2667,12 @@ def test_ap_hs20_remediation_sql(dev, apdev, params):
|
|||
"private_key": "auth_serv/server.key",
|
||||
"subscr_remediation_url": "https://example.org/",
|
||||
"subscr_remediation_method": "1" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['auth_server_port'] = "18128"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET pmf 1")
|
||||
dev[0].hs20_enable()
|
||||
|
@ -2706,7 +2706,7 @@ def test_ap_hs20_external_selection(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['disable_dgaf'] = '1'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].connect("test-hs20", proto="RSN", key_mgmt="WPA-EAP", eap="TTLS",
|
||||
|
@ -2723,7 +2723,7 @@ def test_ap_hs20_random_mac_addr(dev, apdev):
|
|||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
params['disable_dgaf'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5")
|
||||
|
@ -2758,7 +2758,7 @@ def test_ap_hs20_multi_network_and_cred_removal(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,25[3:26]"]
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].add_network()
|
||||
dev[0].hs20_enable()
|
||||
|
@ -2794,7 +2794,7 @@ def test_ap_hs20_interworking_add_network(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['nai_realm'] = [ "0,example.com,21[3:26][6:7][99:99]" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].add_cred_values(default_cred(user="user"))
|
||||
|
@ -2809,7 +2809,7 @@ def _test_ap_hs20_proxyarp(dev, apdev):
|
|||
params['hessid'] = bssid
|
||||
params['disable_dgaf'] = '0'
|
||||
params['proxy_arp'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||
hapd = hostapd.add_ap(apdev[0], params, no_enable=True)
|
||||
if "OK" in hapd.request("ENABLE"):
|
||||
raise Exception("Incomplete hostapd configuration was accepted")
|
||||
hapd.set("ap_isolate", "1")
|
||||
|
@ -2894,8 +2894,8 @@ def test_ap_hs20_hidden_ssid_in_scan_res(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'secret',
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'secret',
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
hapd.disable()
|
||||
hapd_global = hostapd.HostapdGlobal()
|
||||
|
@ -2904,7 +2904,7 @@ def test_ap_hs20_hidden_ssid_in_scan_res(dev, apdev):
|
|||
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
id = dev[0].add_cred_values({ 'realm': "example.com",
|
||||
|
@ -2942,7 +2942,7 @@ def _test_ap_hs20_proxyarp_dgaf(dev, apdev, disabled):
|
|||
params['na_mcast_to_ucast'] = '1'
|
||||
params['ap_isolate'] = '1'
|
||||
params['bridge'] = 'ap-br0'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||
hapd = hostapd.add_ap(apdev[0], params, no_enable=True)
|
||||
try:
|
||||
hapd.enable()
|
||||
except:
|
||||
|
@ -3332,7 +3332,7 @@ def _test_proxyarp_open(dev, apdev, params, ebtables=False):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = { 'ssid': 'open' }
|
||||
params['proxy_arp'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||
hapd = hostapd.add_ap(apdev[0], params, no_enable=True)
|
||||
hapd.set("ap_isolate", "1")
|
||||
hapd.set('bridge', 'ap-br0')
|
||||
hapd.dump_monitor()
|
||||
|
@ -3348,7 +3348,7 @@ def _test_proxyarp_open(dev, apdev, params, ebtables=False):
|
|||
raise Exception("AP startup failed")
|
||||
|
||||
params2 = { 'ssid': 'another' }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params2, no_enable=True)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params2, no_enable=True)
|
||||
hapd2.set('bridge', 'ap-br0')
|
||||
hapd2.enable()
|
||||
|
||||
|
@ -3801,7 +3801,7 @@ def test_ap_hs20_connect_deinit(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="")
|
||||
|
@ -3835,7 +3835,7 @@ def test_ap_hs20_anqp_format_errors(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
values = { 'realm': "example.com",
|
||||
|
|
|
@ -27,7 +27,7 @@ def test_ap_ht40_scan(dev, apdev):
|
|||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -62,12 +62,12 @@ def test_ap_ht40_scan_conflict(dev, apdev):
|
|||
params = { "ssid": "test-ht40",
|
||||
"channel": "6",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -102,12 +102,12 @@ def test_ap_ht40_scan_conflict2(dev, apdev):
|
|||
params = { "ssid": "test-ht40",
|
||||
"channel": "11",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"channel": "1",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -141,7 +141,7 @@ def test_ap_ht40_scan_not_affected(dev, apdev):
|
|||
clear_scan_cache(apdev[0]['ifname'])
|
||||
params = { "ssid": "test-ht20",
|
||||
"channel": "11" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
subprocess.call(['ifconfig', apdev[0]['ifname'], 'up'])
|
||||
subprocess.call(['iw', apdev[0]['ifname'], 'scan', 'trigger', 'freq', '2462'])
|
||||
|
@ -154,7 +154,7 @@ def test_ap_ht40_scan_not_affected(dev, apdev):
|
|||
params = { "ssid": "test-ht40",
|
||||
"channel": "1",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -188,12 +188,12 @@ def test_ap_ht40_scan_legacy_conflict(dev, apdev):
|
|||
clear_scan_cache(apdev[0]['ifname'])
|
||||
params = { "ssid": "legacy-20",
|
||||
"channel": "7", "ieee80211n": "0" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -227,12 +227,12 @@ def test_ap_ht40_scan_ht20_conflict(dev, apdev):
|
|||
clear_scan_cache(apdev[0]['ifname'])
|
||||
params = { "ssid": "ht-20",
|
||||
"channel": "7", "ieee80211n": "1" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -267,12 +267,12 @@ def test_ap_ht40_scan_intolerant(dev, apdev):
|
|||
params = { "ssid": "another-bss",
|
||||
"channel": "1",
|
||||
"ht_capab": "[40-INTOLERANT]" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"channel": "1",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -307,12 +307,12 @@ def test_ap_ht40_scan_match(dev, apdev):
|
|||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -352,13 +352,13 @@ def test_ap_ht40_5ghz_match(dev, apdev):
|
|||
"channel": "36",
|
||||
"country_code": "US",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"hw_mode": "a",
|
||||
"channel": "36",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -406,13 +406,13 @@ def test_ap_ht40_5ghz_switch(dev, apdev):
|
|||
"channel": "36",
|
||||
"country_code": "US",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"hw_mode": "a",
|
||||
"channel": "40",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -459,7 +459,7 @@ def test_ap_ht40_5ghz_switch2(dev, apdev):
|
|||
"channel": "36",
|
||||
"country_code": "US",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
id = dev[0].add_network()
|
||||
dev[0].set_network(id, "mode", "2")
|
||||
|
@ -474,7 +474,7 @@ def test_ap_ht40_5ghz_switch2(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "40",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
@ -517,12 +517,12 @@ def test_obss_scan(dev, apdev):
|
|||
"channel": "6",
|
||||
"ht_capab": "[HT40-]",
|
||||
"obss_interval": "10" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = { "ssid": "another-bss",
|
||||
"channel": "9",
|
||||
"ieee80211n": "0" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].connect("obss-scan", key_mgmt="NONE", scan_freq="2437")
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
|
@ -561,12 +561,12 @@ def test_obss_scan_40_intolerant(dev, apdev):
|
|||
"channel": "6",
|
||||
"ht_capab": "[HT40-]",
|
||||
"obss_interval": "10" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = { "ssid": "another-bss",
|
||||
"channel": "7",
|
||||
"ht_capab": "[40-INTOLERANT]" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].connect("obss-scan", key_mgmt="NONE", scan_freq="2437")
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
|
@ -605,7 +605,7 @@ def test_obss_coex_report_handling(dev, apdev):
|
|||
params = { "ssid": "obss-scan",
|
||||
"channel": "6",
|
||||
"ht_capab": "[HT40-]" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("obss-scan", key_mgmt="NONE", scan_freq="2437")
|
||||
|
||||
|
@ -635,7 +635,7 @@ def test_obss_coex_report_handling1(dev, apdev):
|
|||
"channel": "6",
|
||||
"ht_capab": "[HT40+]",
|
||||
"obss_interval": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("obss-scan", key_mgmt="NONE", scan_freq="2437")
|
||||
|
||||
|
@ -668,7 +668,7 @@ def test_olbc(dev, apdev):
|
|||
"channel": "6",
|
||||
"ht_capab": "[HT40-]",
|
||||
"ap_table_expiration_time": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
status = hapd.get_status()
|
||||
if status['olbc'] != '0' or status['olbc_ht'] != '0':
|
||||
raise Exception("Unexpected OLBC information")
|
||||
|
@ -677,7 +677,7 @@ def test_olbc(dev, apdev):
|
|||
"hw_mode": "b",
|
||||
"channel": "6",
|
||||
"wmm_enabled": "0" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
time.sleep(0.5)
|
||||
status = hapd.get_status()
|
||||
if status['olbc'] != '1' or status['olbc_ht'] != '1':
|
||||
|
@ -709,7 +709,7 @@ def test_olbc_table_limit(dev, apdev):
|
|||
params = { "ssid": "test-olbc",
|
||||
"channel": "1",
|
||||
"ap_table_max_size": "2" }
|
||||
hapd = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
time.sleep(0.3)
|
||||
with alloc_fail(hapd, 1, "ap_list_process_beacon"):
|
||||
|
@ -729,7 +729,7 @@ def test_olbc_5ghz(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "36",
|
||||
"ht_capab": "[HT40+]" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
status = hapd.get_status()
|
||||
if status['olbc'] != '0' or status['olbc_ht'] != '0':
|
||||
raise Exception("Unexpected OLBC information")
|
||||
|
@ -740,7 +740,7 @@ def test_olbc_5ghz(dev, apdev):
|
|||
"channel": "36",
|
||||
"ieee80211n": "0",
|
||||
"wmm_enabled": "0" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
found = False
|
||||
for i in range(20):
|
||||
time.sleep(0.1)
|
||||
|
@ -762,7 +762,7 @@ def test_ap_require_ht(dev, apdev):
|
|||
"""Require HT"""
|
||||
params = { "ssid": "require-ht",
|
||||
"require_ht": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
dev[1].connect("require-ht", key_mgmt="NONE", scan_freq="2412",
|
||||
disable_ht="1", wait_connect=False)
|
||||
|
@ -784,7 +784,7 @@ def test_ap_require_ht_limited_rates(dev, apdev):
|
|||
params = { "ssid": "require-ht",
|
||||
"supported_rates": "60 120 240 360 480 540",
|
||||
"require_ht": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
dev[1].connect("require-ht", key_mgmt="NONE", scan_freq="2412",
|
||||
disable_ht="1", wait_connect=False)
|
||||
|
@ -801,7 +801,7 @@ def test_ap_ht_capab_not_supported(dev, apdev):
|
|||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-][LDPC][SMPS-STATIC][SMPS-DYNAMIC][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][RX-STBC12][RX-STBC123][DELAYED-BA][MAX-AMSDU-7935][DSSS_CCK-40][LSIG-TXOP-PROT]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||
hapd = hostapd.add_ap(apdev[0], params, no_enable=True)
|
||||
if "FAIL" not in hapd.request("ENABLE"):
|
||||
raise Exception("Unexpected ENABLE success")
|
||||
|
||||
|
@ -811,7 +811,7 @@ def test_ap_ht_40mhz_intolerant_sta(dev, apdev):
|
|||
params = { "ssid": "intolerant",
|
||||
"channel": "6",
|
||||
"ht_capab": "[HT40-]" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if hapd.get_status_field("num_sta_ht40_intolerant") != "0":
|
||||
raise Exception("Unexpected num_sta_ht40_intolerant value")
|
||||
if hapd.get_status_field("secondary_channel") != "-1":
|
||||
|
@ -845,7 +845,7 @@ def test_ap_ht_40mhz_intolerant_ap(dev, apdev):
|
|||
"channel": "6",
|
||||
"ht_capab": "[HT40-]",
|
||||
"obss_interval": "3" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ht", key_mgmt="NONE", scan_freq="2437")
|
||||
|
||||
|
@ -856,7 +856,7 @@ def test_ap_ht_40mhz_intolerant_ap(dev, apdev):
|
|||
params = { "ssid": "intolerant",
|
||||
"channel": "5",
|
||||
"ht_capab": "[40-INTOLERANT]" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
logger.info("Waiting for co-ex report from STA")
|
||||
ok = False
|
||||
|
@ -899,7 +899,7 @@ def test_ap_ht40_csa(dev, apdev):
|
|||
"channel": "36",
|
||||
"ht_capab": "[HT40+]",
|
||||
"ieee80211n": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ht", key_mgmt="NONE", scan_freq="5180")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
@ -943,7 +943,7 @@ def test_ap_ht40_csa2(dev, apdev):
|
|||
"channel": "36",
|
||||
"ht_capab": "[HT40+]",
|
||||
"ieee80211n": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ht", key_mgmt="NONE", scan_freq="5180")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
@ -987,7 +987,7 @@ def test_ap_ht40_csa3(dev, apdev):
|
|||
"channel": "36",
|
||||
"ht_capab": "[HT40+]",
|
||||
"ieee80211n": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ht", key_mgmt="NONE", scan_freq="5180")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
@ -1024,11 +1024,11 @@ def test_ap_ht_smps(dev, apdev):
|
|||
"""SMPS AP configuration options"""
|
||||
params = { "ssid": "ht1", "ht_capab": "[SMPS-STATIC]" }
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
except:
|
||||
raise HwsimSkip("Assume mac80211_hwsim was not recent enough to support SMPS")
|
||||
params = { "ssid": "ht2", "ht_capab": "[SMPS-DYNAMIC]" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].connect("ht1", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect("ht2", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -1040,12 +1040,12 @@ def test_prefer_ht20(dev, apdev):
|
|||
params = { "ssid": "test",
|
||||
"channel": "1",
|
||||
"ieee80211n": "0" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
params = { "ssid": "test",
|
||||
"channel": "1",
|
||||
"ieee80211n": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
|
@ -1067,13 +1067,13 @@ def test_prefer_ht40(dev, apdev):
|
|||
params = { "ssid": "test",
|
||||
"channel": "1",
|
||||
"ieee80211n": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
params = { "ssid": "test",
|
||||
"channel": "1",
|
||||
"ieee80211n": "1",
|
||||
"ht_capab": "[HT40+]" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
|
@ -1095,7 +1095,7 @@ def test_prefer_ht20_during_roam(dev, apdev):
|
|||
params = { "ssid": "test",
|
||||
"channel": "1",
|
||||
"ieee80211n": "0" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
|
@ -1104,7 +1104,7 @@ def test_prefer_ht20_during_roam(dev, apdev):
|
|||
params = { "ssid": "test",
|
||||
"channel": "1",
|
||||
"ieee80211n": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
dev[0].scan_for_bss(bssid2, freq=2412)
|
||||
dev[0].scan(freq=2412)
|
||||
|
@ -1122,7 +1122,7 @@ def test_ap_ht40_5ghz_invalid_pair(dev, apdev):
|
|||
"channel": "40",
|
||||
"country_code": "US",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[1], params, wait_enabled=False)
|
||||
ev = hapd.wait_event(["AP-DISABLED", "AP-ENABLED"], timeout=10)
|
||||
if not ev:
|
||||
raise Exception("AP setup failure timed out")
|
||||
|
@ -1142,7 +1142,7 @@ def test_ap_ht40_5ghz_disabled_sec(dev, apdev):
|
|||
"channel": "48",
|
||||
"country_code": "US",
|
||||
"ht_capab": "[HT40+]"}
|
||||
hapd = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[1], params, wait_enabled=False)
|
||||
ev = hapd.wait_event(["AP-DISABLED", "AP-ENABLED"], timeout=10)
|
||||
if not ev:
|
||||
raise Exception("AP setup failure timed out")
|
||||
|
@ -1162,12 +1162,12 @@ def test_ap_ht40_scan_broken_ap(dev, apdev):
|
|||
"channel": "7", "ieee80211n": "0",
|
||||
"wmm_enabled": "1",
|
||||
"vendor_elements": "2d1a0e001bffff000000000000000000000100000000000000000000" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-ht40",
|
||||
"channel": "5",
|
||||
"ht_capab": "[HT40-]"}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "HT_SCAN":
|
||||
|
|
|
@ -24,7 +24,7 @@ def test_ap_mixed_security(dev, apdev):
|
|||
params["eap_server"] = "1"
|
||||
params["eap_user_file"] = "auth_serv/eap_user.conf"
|
||||
params['nas_identifier'] = "nas1.w1.fi"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, key_mgmt="WPA-PSK", proto="WPA", pairwise="TKIP",
|
||||
psk=passphrase, scan_freq="2412")
|
||||
|
|
|
@ -22,7 +22,7 @@ def test_ap_open(dev, apdev):
|
|||
_test_ap_open(dev, apdev)
|
||||
|
||||
def _test_ap_open(dev, apdev):
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
bg_scan_period="0")
|
||||
ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5)
|
||||
|
@ -42,7 +42,7 @@ def test_ap_open_packet_loss(dev, apdev):
|
|||
"ignore_auth_probability": "0.5",
|
||||
"ignore_assoc_probability": "0.5",
|
||||
"ignore_reassoc_probability": "0.5" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
for i in range(0, 3):
|
||||
dev[i].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
wait_connect=False)
|
||||
|
@ -51,7 +51,7 @@ def test_ap_open_packet_loss(dev, apdev):
|
|||
|
||||
def test_ap_open_unknown_action(dev, apdev):
|
||||
"""AP with open mode configuration and unknown Action frame"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
bssid = apdev[0]['bssid']
|
||||
cmd = "MGMT_TX {} {} freq=2412 action=765432".format(bssid, bssid)
|
||||
|
@ -65,7 +65,7 @@ def test_ap_open_unknown_action(dev, apdev):
|
|||
|
||||
def test_ap_open_invalid_wmm_action(dev, apdev):
|
||||
"""AP with open mode configuration and invalid WMM Action frame"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
bssid = apdev[0]['bssid']
|
||||
cmd = "MGMT_TX {} {} freq=2412 action=1100".format(bssid, bssid)
|
||||
|
@ -77,7 +77,7 @@ def test_ap_open_invalid_wmm_action(dev, apdev):
|
|||
|
||||
def test_ap_open_reconnect_on_inactivity_disconnect(dev, apdev):
|
||||
"""Reconnect to open mode AP after inactivity related disconnection"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
hapd.request("DEAUTHENTICATE " + dev[0].p2p_interface_addr() + " reason=4")
|
||||
dev[0].wait_disconnected(timeout=5)
|
||||
|
@ -86,7 +86,7 @@ def test_ap_open_reconnect_on_inactivity_disconnect(dev, apdev):
|
|||
def test_ap_open_assoc_timeout(dev, apdev):
|
||||
"""AP timing out association"""
|
||||
ssid = "test"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].scan(freq="2412")
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
|
@ -125,7 +125,7 @@ def test_ap_open_assoc_timeout(dev, apdev):
|
|||
|
||||
def test_ap_open_id_str(dev, apdev):
|
||||
"""AP with open mode and id_str"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412", id_str="foo",
|
||||
wait_connect=False)
|
||||
ev = dev[0].wait_connected(timeout=10)
|
||||
|
@ -136,7 +136,7 @@ def test_ap_open_id_str(dev, apdev):
|
|||
|
||||
def test_ap_open_select_any(dev, apdev):
|
||||
"""AP with open mode and select any network"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
id = dev[0].connect("unknown", key_mgmt="NONE", scan_freq="2412",
|
||||
only_add_network=True)
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
|
@ -154,7 +154,7 @@ def test_ap_open_select_any(dev, apdev):
|
|||
|
||||
def test_ap_open_unexpected_assoc_event(dev, apdev):
|
||||
"""AP with open mode and unexpected association event"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[0].request("DISCONNECT")
|
||||
dev[0].wait_disconnected(timeout=15)
|
||||
|
@ -175,7 +175,7 @@ def test_ap_open_unexpected_assoc_event(dev, apdev):
|
|||
|
||||
def test_ap_bss_load(dev, apdev):
|
||||
"""AP with open mode (no security) configuration"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "open",
|
||||
"bss_load_update_period": "10" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -200,7 +200,7 @@ def hapd_out_of_mem(hapd, apdev, count, func):
|
|||
|
||||
def test_ap_open_out_of_memory(dev, apdev):
|
||||
"""hostapd failing to setup interface due to allocation failure"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
hapd_out_of_mem(hapd, apdev[1], 1, "hostapd_alloc_bss_data")
|
||||
|
||||
for i in range(1, 3):
|
||||
|
@ -221,12 +221,12 @@ def test_ap_open_out_of_memory(dev, apdev):
|
|||
|
||||
# verify that a new interface can still be added when memory allocation does
|
||||
# not fail
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "open" })
|
||||
|
||||
def test_bssid_black_white_list(dev, apdev):
|
||||
"""BSSID black/white list"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
hapd2 = hostapd.add_ap(apdev[1], { "ssid": "open" })
|
||||
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
bssid_whitelist=apdev[1]['bssid'])
|
||||
|
@ -275,7 +275,7 @@ def test_ap_open_wpas_in_bridge(dev, apdev):
|
|||
subprocess.call(['iw', ifname, 'set', '4addr', 'off'])
|
||||
|
||||
def _test_ap_open_wpas_in_bridge(dev, apdev):
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
|
||||
br_ifname='sta-br0'
|
||||
ifname='wlan5'
|
||||
|
@ -302,8 +302,8 @@ def _test_ap_open_wpas_in_bridge(dev, apdev):
|
|||
|
||||
def test_ap_open_start_disabled(dev, apdev):
|
||||
"""AP with open mode and beaconing disabled"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open",
|
||||
"start_disabled": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open",
|
||||
"start_disabled": "1" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].flush_scan_cache()
|
||||
|
@ -317,8 +317,8 @@ def test_ap_open_start_disabled(dev, apdev):
|
|||
|
||||
def test_ap_open_start_disabled2(dev, apdev):
|
||||
"""AP with open mode and beaconing disabled (2)"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open",
|
||||
"start_disabled": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open",
|
||||
"start_disabled": "1" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].flush_scan_cache()
|
||||
|
@ -340,7 +340,7 @@ def test_ap_open_ifdown(dev, apdev):
|
|||
"""AP with open mode and external ifconfig down"""
|
||||
params = { "ssid": "open",
|
||||
"ap_max_inactivity": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -369,7 +369,7 @@ def test_ap_open_ifdown(dev, apdev):
|
|||
|
||||
def test_ap_open_disconnect_in_ps(dev, apdev, params):
|
||||
"""Disconnect with the client in PS to regression-test a kernel bug"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
bg_scan_period="0")
|
||||
ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5)
|
||||
|
@ -411,9 +411,9 @@ def test_ap_open_disconnect_in_ps(dev, apdev, params):
|
|||
|
||||
def test_ap_open_select_network(dev, apdev):
|
||||
"""Open mode connection and SELECT_NETWORK to change network"""
|
||||
hapd1 = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd1 = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
bssid1 = apdev[0]['bssid']
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open2" })
|
||||
hapd2 = hostapd.add_ap(apdev[1], { "ssid": "open2" })
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
id1 = dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
|
@ -437,7 +437,7 @@ def test_ap_open_select_network(dev, apdev):
|
|||
|
||||
def test_ap_open_disable_enable(dev, apdev):
|
||||
"""AP with open mode getting disabled and re-enabled"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
bg_scan_period="0")
|
||||
|
||||
|
@ -477,7 +477,7 @@ def sta_enable_disable(dev, bssid):
|
|||
|
||||
def test_ap_open_sta_enable_disable(dev, apdev):
|
||||
"""AP with open mode and wpa_supplicant ENABLE/DISABLE_NETWORK"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
sta_enable_disable(dev[0], bssid)
|
||||
|
@ -494,7 +494,7 @@ def test_ap_open_select_twice(dev, apdev):
|
|||
ev = dev[0].wait_event(["CTRL-EVENT-NETWORK-NOT-FOUND"], timeout=10)
|
||||
if ev is None:
|
||||
raise Exception("No result reported")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
# Verify that the second SELECT_NETWORK starts a new scan immediately by
|
||||
# waiting less than the default scan period.
|
||||
dev[0].select_network(id)
|
||||
|
|
|
@ -21,7 +21,7 @@ def test_ap_fragmentation_rts_set_high(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['rts_threshold'] = "1000"
|
||||
params['fragm_threshold'] = "2000"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -31,7 +31,7 @@ def test_ap_fragmentation_open(dev, apdev):
|
|||
params = {}
|
||||
params['ssid'] = ssid
|
||||
params['fragm_threshold'] = "1000"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -41,7 +41,7 @@ def test_ap_fragmentation_wpa2(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['fragm_threshold'] = "1000"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -52,7 +52,7 @@ def test_ap_vendor_elements(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['vendor_elements'] = "dd0411223301"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
bss = dev[0].get_bss(bssid)
|
||||
if "dd0411223301" not in bss['ie']:
|
||||
|
@ -74,7 +74,7 @@ def test_ap_element_parse(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
params = { 'ssid': ssid,
|
||||
'vendor_elements': "380501020304059e009e009e009e009e009e00" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
bss = dev[0].get_bss(bssid)
|
||||
if "38050102030405" not in bss['ie']:
|
||||
|
@ -86,7 +86,7 @@ def test_ap_element_parse_oom(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
params = { 'ssid': ssid,
|
||||
'vendor_elements': "dd0d506f9a0a00000600411c440028" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
with alloc_fail(dev[0], 1, "wpabuf_alloc;ieee802_11_vendor_ie_concat"):
|
||||
bss = dev[0].get_bss(bssid)
|
||||
|
@ -104,7 +104,7 @@ def test_ap_country(dev, apdev):
|
|||
params['ieee80211d'] = '1'
|
||||
params['hw_mode'] = 'a'
|
||||
params['channel'] = '36'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="5180")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
finally:
|
||||
|
@ -120,7 +120,7 @@ def test_ap_acl_accept(dev, apdev):
|
|||
params = {}
|
||||
params['ssid'] = ssid
|
||||
params['accept_mac_file'] = "hostapd.macaddr"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -141,7 +141,7 @@ def test_ap_acl_deny(dev, apdev):
|
|||
params = {}
|
||||
params['ssid'] = ssid
|
||||
params['deny_mac_file'] = "hostapd.macaddr"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412", wait_connect=False)
|
||||
dev[1].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -157,7 +157,7 @@ def test_ap_wds_sta(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wds_sta'] = "1"
|
||||
params['wds_bridge'] = "wds-br0"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
try:
|
||||
subprocess.call(['brctl', 'addbr', 'wds-br0'])
|
||||
|
@ -178,7 +178,7 @@ def test_ap_inactivity_poll(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['ap_max_inactivity'] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
dev[0].request("DISCONNECT")
|
||||
|
@ -197,7 +197,7 @@ def test_ap_inactivity_disconnect(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['ap_max_inactivity'] = "1"
|
||||
params['skip_inactivity_poll'] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
dev[0].request("DISCONNECT")
|
||||
|
@ -215,7 +215,7 @@ def test_ap_basic_rates(dev, apdev):
|
|||
params = {}
|
||||
params['ssid'] = ssid
|
||||
params['basic_rates'] = "10 20 55 110 60 90 120 180 240 360 480 540"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
def test_ap_short_preamble(dev, apdev):
|
||||
|
@ -224,7 +224,7 @@ def test_ap_short_preamble(dev, apdev):
|
|||
params = {}
|
||||
params['ssid'] = ssid
|
||||
params['preamble'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
def test_ap_spectrum_management_required(dev, apdev):
|
||||
|
@ -240,7 +240,7 @@ def test_ap_spectrum_management_required(dev, apdev):
|
|||
params['spectrum_mgmt_required'] = "1"
|
||||
try:
|
||||
hapd = None
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="5180")
|
||||
finally:
|
||||
dev[0].request("DISCONNECT")
|
||||
|
@ -255,7 +255,7 @@ def test_ap_max_listen_interval(dev, apdev):
|
|||
params = {}
|
||||
params['ssid'] = ssid
|
||||
params['max_listen_interval'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412", wait_connect=False)
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"])
|
||||
if ev is None:
|
||||
|
@ -269,7 +269,7 @@ def test_ap_max_num_sta(dev, apdev):
|
|||
params = {}
|
||||
params['ssid'] = ssid
|
||||
params['max_num_sta'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[1].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412", wait_connect=False)
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
|
||||
|
@ -286,7 +286,7 @@ def test_ap_max_num_sta_no_probe_resp(dev, apdev, params):
|
|||
params['beacon_int'] = "2000"
|
||||
params['max_num_sta'] = "1"
|
||||
params['no_probe_resp_if_max_sta'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[1].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
dev[0].scan(freq=2412, type="ONLY")
|
||||
dev[0].scan(freq=2412, type="ONLY")
|
||||
|
@ -318,6 +318,6 @@ def test_ap_tx_queue_params(dev, apdev):
|
|||
params['tx_queue_data1_cwmin'] = "7"
|
||||
params['tx_queue_data1_cwmax'] = "1023"
|
||||
params['tx_queue_data1_burst'] = "2"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
|
|
@ -24,7 +24,7 @@ def test_ap_pmf_required(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256";
|
||||
params["ieee80211w"] = "2";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "WPA-PSK-SHA256":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -61,7 +61,7 @@ def test_ap_pmf_optional(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK";
|
||||
params["ieee80211w"] = "1";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk="12345678", ieee80211w="1",
|
||||
key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -83,7 +83,7 @@ def test_ap_pmf_optional_2akm(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK WPA-PSK-SHA256";
|
||||
params["ieee80211w"] = "1";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk="12345678", ieee80211w="1",
|
||||
key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -107,7 +107,7 @@ def test_ap_pmf_negative(dev, apdev):
|
|||
wt.flush()
|
||||
wt.add_passphrase("12345678")
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk="12345678", ieee80211w="1",
|
||||
key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -131,7 +131,7 @@ def test_ap_pmf_assoc_comeback(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256";
|
||||
params["ieee80211w"] = "2";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk="12345678", ieee80211w="1",
|
||||
key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
|
@ -154,7 +154,7 @@ def test_ap_pmf_assoc_comeback2(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK";
|
||||
params["ieee80211w"] = "1";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk="12345678", ieee80211w="2",
|
||||
key_mgmt="WPA-PSK", proto="WPA2", scan_freq="2412")
|
||||
if "OK" not in dev[0].request("DROP_SA"):
|
||||
|
@ -318,7 +318,7 @@ def test_ap_pmf_required_eap(dev, apdev):
|
|||
params = hostapd.wpa2_eap_params(ssid=ssid)
|
||||
params["wpa_key_mgmt"] = "WPA-EAP-SHA256";
|
||||
params["ieee80211w"] = "2";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "WPA-EAP-SHA256":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -335,7 +335,7 @@ def test_ap_pmf_optional_eap(dev, apdev):
|
|||
"""WPA2EAP AP with PMF optional"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||
params["ieee80211w"] = "1";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
|
||||
identity="pap user", anonymous_identity="ttls",
|
||||
password="password",
|
||||
|
@ -356,7 +356,7 @@ def test_ap_pmf_required_sha1(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK";
|
||||
params["ieee80211w"] = "2";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "WPA-PSK":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -383,7 +383,7 @@ def _test_ap_pmf_toggle(dev, apdev):
|
|||
params["ieee80211w"] = "1";
|
||||
params["assoc_sa_query_max_timeout"] = "1"
|
||||
params["assoc_sa_query_retry_timeout"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
addr = dev[0].own_addr()
|
||||
dev[0].request("SET reassoc_same_bss_optim 1")
|
||||
|
@ -428,7 +428,7 @@ def test_ap_pmf_required_sta_no_pmf(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256";
|
||||
params["ieee80211w"] = "2";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
# Disable PMF on the station and try to connect
|
||||
dev[0].connect(ssid, psk="12345678", ieee80211w="0",
|
||||
|
|
|
@ -34,7 +34,7 @@ def test_ap_wpa2_psk(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid)
|
||||
params['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "WPA-PSK":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -55,7 +55,7 @@ def test_ap_wpa2_psk_file(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_psk_file'] = 'hostapd.wpa_psk'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[1].connect(ssid, psk="very secret", scan_freq="2412", wait_connect=False)
|
||||
dev[2].connect(ssid, raw_psk=psk, scan_freq="2412")
|
||||
dev[2].request("REMOVE_NETWORK all")
|
||||
|
@ -82,7 +82,7 @@ def _test_ap_wpa2_psk_mem(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid)
|
||||
params['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, mem_only_psk="1", scan_freq="2412", wait_connect=False)
|
||||
dev[0].request("SCAN_INTERVAL 1")
|
||||
|
@ -107,7 +107,7 @@ def test_ap_wpa2_ptk_rekey(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, wpa_ptk_rekey="1", scan_freq="2412")
|
||||
ev = dev[0].wait_event(["WPA: Key negotiation completed"])
|
||||
if ev is None:
|
||||
|
@ -120,7 +120,7 @@ def test_ap_wpa2_ptk_rekey_ap(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_ptk_rekey'] = '2'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
ev = dev[0].wait_event(["WPA: Key negotiation completed"])
|
||||
if ev is None:
|
||||
|
@ -133,7 +133,7 @@ def test_ap_wpa2_sha256_ptk_rekey(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="WPA-PSK-SHA256",
|
||||
wpa_ptk_rekey="1", scan_freq="2412")
|
||||
ev = dev[0].wait_event(["WPA: Key negotiation completed"])
|
||||
|
@ -150,7 +150,7 @@ def test_ap_wpa2_sha256_ptk_rekey_ap(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256"
|
||||
params['wpa_ptk_rekey'] = '2'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="WPA-PSK-SHA256",
|
||||
scan_freq="2412")
|
||||
ev = dev[0].wait_event(["WPA: Key negotiation completed"])
|
||||
|
@ -166,7 +166,7 @@ def test_ap_wpa_ptk_rekey(dev, apdev):
|
|||
ssid = "test-wpa-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, wpa_ptk_rekey="1", scan_freq="2412")
|
||||
if "[WPA-PSK-TKIP]" not in dev[0].request("SCAN_RESULTS"):
|
||||
raise Exception("Scan results missing WPA element info")
|
||||
|
@ -182,7 +182,7 @@ def test_ap_wpa_ptk_rekey_ap(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_ptk_rekey'] = '2'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
ev = dev[0].wait_event(["WPA: Key negotiation completed"], timeout=10)
|
||||
if ev is None:
|
||||
|
@ -195,7 +195,7 @@ def test_ap_wpa_ccmp(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_pairwise'] = "CCMP"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
check_mib(dev[0], [ ("dot11RSNAConfigGroupCipherSize", "128"),
|
||||
|
@ -224,7 +224,7 @@ def test_ap_wpa2_psk_file(dev, apdev):
|
|||
|
||||
try:
|
||||
# missing PSK file
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||
hapd = hostapd.add_ap(apdev[0], params, no_enable=True)
|
||||
if "FAIL" not in hapd.request("ENABLE"):
|
||||
raise Exception("Unexpected ENABLE success")
|
||||
hapd.request("DISABLE")
|
||||
|
@ -276,7 +276,7 @@ def test_ap_wpa2_psk_wildcard_ssid(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("", bssid=apdev[0]['bssid'], psk=passphrase,
|
||||
scan_freq="2412")
|
||||
dev[1].connect("", bssid=apdev[0]['bssid'], raw_psk=psk, scan_freq="2412")
|
||||
|
@ -287,7 +287,7 @@ def test_ap_wpa2_gtk_rekey(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_group_rekey'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
ev = dev[0].wait_event(["WPA: Group rekeying completed"], timeout=2)
|
||||
if ev is None:
|
||||
|
@ -301,7 +301,7 @@ def test_ap_wpa_gtk_rekey(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_group_rekey'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
ev = dev[0].wait_event(["WPA: Group rekeying completed"], timeout=2)
|
||||
if ev is None:
|
||||
|
@ -315,7 +315,7 @@ def test_ap_wpa2_gmk_rekey(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_group_rekey'] = '1'
|
||||
params['wpa_gmk_rekey'] = '2'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
for i in range(0, 3):
|
||||
ev = dev[0].wait_event(["WPA: Group rekeying completed"], timeout=2)
|
||||
|
@ -329,7 +329,7 @@ def test_ap_wpa2_strict_rekey(dev, apdev):
|
|||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['wpa_strict_rekey'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
dev[1].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
dev[1].request("DISCONNECT")
|
||||
|
@ -345,7 +345,7 @@ def test_ap_wpa2_bridge_fdb(dev, apdev):
|
|||
passphrase = "12345678"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['bridge'] = 'ap-br0'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
subprocess.call(['brctl', 'setfd', 'ap-br0', '0'])
|
||||
subprocess.call(['ip', 'link', 'set', 'dev', 'ap-br0', 'up'])
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412",
|
||||
|
@ -462,7 +462,7 @@ def test_ap_wpa2_psk_ext(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid)
|
||||
params['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd.request("SET ext_eapol_frame_io 1")
|
||||
dev[0].request("SET ext_eapol_frame_io 1")
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412", wait_connect=False)
|
||||
|
@ -494,7 +494,7 @@ def test_ap_wpa2_psk_ext_retry_msg_3(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid)
|
||||
params['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd.request("SET ext_eapol_frame_io 1")
|
||||
dev[0].request("SET ext_eapol_frame_io 1")
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412", wait_connect=False)
|
||||
|
@ -1742,7 +1742,7 @@ def test_wpa2_psk_key_lifetime_in_memory(dev, apdev, params):
|
|||
pmk = binascii.unhexlify(psk)
|
||||
p = hostapd.wpa2_params(ssid=ssid)
|
||||
p['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], p)
|
||||
hapd = hostapd.add_ap(apdev[0], p)
|
||||
|
||||
pid = find_wpas_process(dev[0])
|
||||
|
||||
|
@ -1841,7 +1841,7 @@ def test_ap_wpa2_psk_wep(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
try:
|
||||
hapd.set('wep_key0', '"hello"')
|
||||
raise Exception("WEP key accepted to WPA2 network")
|
||||
|
@ -1864,7 +1864,7 @@ def _test_ap_wpa2_psk_wpas_in_bridge(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
br_ifname='sta-br0'
|
||||
ifname='wlan5'
|
||||
|
@ -1885,7 +1885,7 @@ def test_ap_wpa2_psk_ifdown(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
|
@ -1910,7 +1910,7 @@ def test_ap_wpa2_psk_drop_first_msg_4(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid)
|
||||
params['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd.request("SET ext_eapol_frame_io 1")
|
||||
dev[0].request("SET ext_eapol_frame_io 1")
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412", wait_connect=False)
|
||||
|
@ -1976,7 +1976,7 @@ def test_ap_wpa2_psk_disable_enable(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid)
|
||||
params['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, raw_psk=psk, scan_freq="2412")
|
||||
|
||||
for i in range(2):
|
||||
|
@ -1991,7 +1991,7 @@ def test_ap_wpa2_psk_incorrect_passphrase(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk="incorrect passphrase", scan_freq="2412",
|
||||
wait_connect=False)
|
||||
ev = hapd.wait_event(["AP-STA-POSSIBLE-PSK-MISMATCH"], timeout=10)
|
||||
|
@ -2011,7 +2011,7 @@ def test_ap_wpa_ie_parsing(dev, apdev):
|
|||
ssid = "test-wpa-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
id = dev[0].connect(ssid, psk=passphrase, scan_freq="2412",
|
||||
only_add_network=True)
|
||||
|
||||
|
@ -2072,7 +2072,7 @@ def test_ap_wpa2_psk_no_random(dev, apdev):
|
|||
psk = '602e323e077bc63bd80307ef4745b754b0ae0a925c2638ecd13a794b9527b9e6'
|
||||
params = hostapd.wpa2_params(ssid=ssid)
|
||||
params['wpa_psk'] = psk
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
with fail_test(hapd, 1, "wpa_gmk_to_gtk"):
|
||||
id = dev[0].connect(ssid, raw_psk=psk, scan_freq="2412",
|
||||
wait_connect=False)
|
||||
|
@ -2091,7 +2091,7 @@ def test_rsn_ie_proto_psk_sta(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
# This is the RSN element used normally by hostapd
|
||||
params['own_ie_override'] = '30140100000fac040100000fac040100000fac020c00'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("SET own_ie_override qwerty"):
|
||||
raise Exception("Invalid own_ie_override value accepted")
|
||||
id = dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
|
@ -2162,7 +2162,7 @@ def test_ap_wpa2_psk_assoc_rsn(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
tests = [ ("Normal wpa_supplicant assoc req RSN IE",
|
||||
"30140100000fac040100000fac040100000fac020000"),
|
||||
|
|
|
@ -41,7 +41,7 @@ def test_ap_qosmap(dev, apdev):
|
|||
ssid = "test-qosmap"
|
||||
params = { "ssid": ssid }
|
||||
params['qos_map_set'] = '53,2,22,6,8,15,0,7,255,255,16,31,32,39,255,255,40,47,48,55'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
time.sleep(0.1)
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
|
@ -76,7 +76,7 @@ def test_ap_qosmap_default(dev, apdev):
|
|||
"""QoS mapping with default values"""
|
||||
ssid = "test-qosmap-default"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
dev[0].request("DATA_TEST_CONFIG 1")
|
||||
|
@ -110,7 +110,7 @@ def test_ap_qosmap_default_acm(dev, apdev):
|
|||
"wmm_ac_vo_cwmax": "2",
|
||||
"wmm_ac_vo_txop_limit": "47",
|
||||
"wmm_ac_vo_acm": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
dev[0].request("DATA_TEST_CONFIG 1")
|
||||
|
@ -129,7 +129,7 @@ def test_ap_qosmap_invalid(dev, apdev):
|
|||
"""QoS mapping ctrl_iface error handling"""
|
||||
ssid = "test-qosmap"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("SEND_QOS_MAP_CONF 00:11:22:33:44:55"):
|
||||
raise Exception("Unexpected SEND_QOS_MAP_CONF success")
|
||||
if "FAIL" not in hapd.request("SET_QOS_MAP_SET "):
|
||||
|
|
|
@ -14,10 +14,10 @@ import hostapd
|
|||
|
||||
def test_ap_roam_open(dev, apdev):
|
||||
"""Roam between two open APs"""
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd0 = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd0)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-open" })
|
||||
hapd1 = hostapd.add_ap(apdev[1], { "ssid": "test-open" })
|
||||
dev[0].scan(type="ONLY")
|
||||
dev[0].roam(apdev[1]['bssid'])
|
||||
hwsim_utils.test_connectivity(dev[0], hapd1)
|
||||
|
@ -27,10 +27,10 @@ def test_ap_roam_open(dev, apdev):
|
|||
def test_ap_roam_wpa2_psk(dev, apdev):
|
||||
"""Roam between two WPA2-PSK APs"""
|
||||
params = hostapd.wpa2_params(ssid="test-wpa2-psk", passphrase="12345678")
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("test-wpa2-psk", psk="12345678")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd0)
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
dev[0].scan(type="ONLY")
|
||||
dev[0].roam(apdev[1]['bssid'])
|
||||
hwsim_utils.test_connectivity(dev[0], hapd1)
|
||||
|
@ -39,7 +39,7 @@ def test_ap_roam_wpa2_psk(dev, apdev):
|
|||
|
||||
def test_ap_reassociation_to_same_bss(dev, apdev):
|
||||
"""Reassociate to the same BSS"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE")
|
||||
|
||||
dev[0].request("REASSOCIATE")
|
||||
|
@ -52,8 +52,8 @@ def test_ap_reassociation_to_same_bss(dev, apdev):
|
|||
|
||||
def test_ap_roam_set_bssid(dev, apdev):
|
||||
"""Roam control"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-open" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "test-open" })
|
||||
id = dev[0].connect("test-open", key_mgmt="NONE", bssid=apdev[1]['bssid'],
|
||||
scan_freq="2412")
|
||||
if dev[0].get_status_field('bssid') != apdev[1]['bssid']:
|
||||
|
@ -69,12 +69,12 @@ def test_ap_roam_set_bssid(dev, apdev):
|
|||
def test_ap_roam_wpa2_psk_race(dev, apdev):
|
||||
"""Roam between two WPA2-PSK APs and try to hit a disconnection race"""
|
||||
params = hostapd.wpa2_params(ssid="test-wpa2-psk", passphrase="12345678")
|
||||
hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd0 = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("test-wpa2-psk", psk="12345678", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd0)
|
||||
|
||||
params['channel'] = '2'
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq=2417)
|
||||
dev[0].roam(apdev[1]['bssid'])
|
||||
hwsim_utils.test_connectivity(dev[0], hapd1)
|
||||
|
|
|
@ -273,7 +273,7 @@ def test_ap_wpa2_tdls_wrong_tpk_m3_mic(dev, apdev):
|
|||
def test_ap_wpa_tdls(dev, apdev):
|
||||
"""WPA-PSK AP and two stations using TDLS"""
|
||||
skip_with_fips(dev[0])
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
hostapd.wpa_params(ssid="test-wpa-psk",
|
||||
passphrase="12345678"))
|
||||
wlantest_setup()
|
||||
|
@ -285,7 +285,7 @@ def test_ap_wpa_tdls(dev, apdev):
|
|||
def test_ap_wpa_mixed_tdls(dev, apdev):
|
||||
"""WPA+WPA2-PSK AP and two stations using TDLS"""
|
||||
skip_with_fips(dev[0])
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
hostapd.wpa_mixed_params(ssid="test-wpa-mixed-psk",
|
||||
passphrase="12345678"))
|
||||
wlantest_setup()
|
||||
|
@ -296,7 +296,7 @@ def test_ap_wpa_mixed_tdls(dev, apdev):
|
|||
|
||||
def test_ap_wep_tdls(dev, apdev):
|
||||
"""WEP AP and two stations using TDLS"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "test-wep", "wep_key0": '"hello"' })
|
||||
wlantest_setup()
|
||||
connect_2sta_wep(dev, hapd)
|
||||
|
@ -306,7 +306,7 @@ def test_ap_wep_tdls(dev, apdev):
|
|||
|
||||
def test_ap_open_tdls(dev, apdev):
|
||||
"""Open AP and two stations using TDLS"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
wlantest_setup()
|
||||
connect_2sta_open(dev, hapd)
|
||||
setup_tdls(dev[0], dev[1], apdev[0])
|
||||
|
@ -321,8 +321,8 @@ def test_ap_wpa2_tdls_bssid_mismatch(dev, apdev):
|
|||
passphrase = "12345678"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['bridge'] = 'ap-br0'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
wlantest_setup()
|
||||
subprocess.call(['brctl', 'setfd', 'ap-br0', '0'])
|
||||
subprocess.call(['ip', 'link', 'set', 'dev', 'ap-br0', 'up'])
|
||||
|
@ -363,7 +363,7 @@ def test_ap_open_tdls_vht(dev, apdev):
|
|||
"vht_oper_chwidth": "0",
|
||||
"vht_oper_centr_freq_seg0_idx": "0" }
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
wlantest_setup()
|
||||
connect_2sta_open(dev, hapd, scan_freq="5180")
|
||||
setup_tdls(dev[0], dev[1], apdev[0])
|
||||
|
@ -393,7 +393,7 @@ def test_ap_open_tdls_vht80(dev, apdev):
|
|||
"vht_oper_centr_freq_seg0_idx": "42" }
|
||||
try:
|
||||
hapd = None
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
wlantest_setup()
|
||||
connect_2sta_open(dev, hapd, scan_freq="5180")
|
||||
sig = dev[0].request("SIGNAL_POLL").splitlines()
|
||||
|
@ -437,7 +437,7 @@ def test_ap_open_tdls_vht80plus80(dev, apdev):
|
|||
"vht_oper_centr_freq_seg1_idx": "155" }
|
||||
try:
|
||||
hapd = None
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
wlantest_setup()
|
||||
connect_2sta_open(dev, hapd, scan_freq="5180")
|
||||
sig = dev[0].request("SIGNAL_POLL").splitlines()
|
||||
|
@ -485,7 +485,7 @@ def test_ap_open_tdls_vht160(dev, apdev):
|
|||
"vht_oper_centr_freq_seg0_idx": "114" }
|
||||
try:
|
||||
hapd = None
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
ev = hapd.wait_event(["AP-ENABLED"], timeout=2)
|
||||
if not ev:
|
||||
cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
|
||||
|
@ -528,7 +528,7 @@ def test_tdls_chan_switch(dev, apdev):
|
|||
if flags & 0x800000000 == 0:
|
||||
raise HwsimSkip("Driver does not support TDLS channel switching")
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
connect_2sta_open(dev, hapd)
|
||||
setup_tdls(dev[0], dev[1], apdev[0])
|
||||
if "OK" not in dev[0].request("TDLS_CHAN_SWITCH " + dev[1].own_addr() + " 81 2462"):
|
||||
|
|
|
@ -25,7 +25,7 @@ def _test_ap_track_sta(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "6",
|
||||
"track_sta_max_num": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "track",
|
||||
|
@ -34,7 +34,7 @@ def _test_ap_track_sta(dev, apdev):
|
|||
"channel": "40",
|
||||
"track_sta_max_num": "100",
|
||||
"track_sta_max_age": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
for i in range(2):
|
||||
|
@ -94,7 +94,7 @@ def _test_ap_track_sta_no_probe_resp(dev, apdev):
|
|||
"channel": "6",
|
||||
"beacon_int": "10000",
|
||||
"no_probe_resp_if_seen_on": apdev[1]['ifname'] }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "track",
|
||||
|
@ -102,7 +102,7 @@ def _test_ap_track_sta_no_probe_resp(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "40",
|
||||
"track_sta_max_num": "100" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid2, freq=5200, force_scan=True)
|
||||
|
@ -127,7 +127,7 @@ def _test_ap_track_sta_no_auth(dev, apdev):
|
|||
"channel": "6",
|
||||
"track_sta_max_num": "100",
|
||||
"no_auth_if_seen_on": apdev[1]['ifname'] }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "track",
|
||||
|
@ -135,7 +135,7 @@ def _test_ap_track_sta_no_auth(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "40",
|
||||
"track_sta_max_num": "100" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2437, force_scan=True)
|
||||
|
@ -174,7 +174,7 @@ def _test_ap_track_sta_no_auth_passive(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "6",
|
||||
"no_auth_if_seen_on": apdev[1]['ifname'] }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "track",
|
||||
|
@ -184,7 +184,7 @@ def _test_ap_track_sta_no_auth_passive(dev, apdev):
|
|||
"interworking": "1",
|
||||
"venue_name": "eng:Venue",
|
||||
"track_sta_max_num": "100" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2437, force_scan=True)
|
||||
|
@ -230,7 +230,7 @@ def _test_ap_track_sta_force_5ghz(dev, apdev):
|
|||
"channel": "6",
|
||||
"no_probe_resp_if_seen_on": apdev[1]['ifname'],
|
||||
"no_auth_if_seen_on": apdev[1]['ifname'] }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "track",
|
||||
|
@ -238,7 +238,7 @@ def _test_ap_track_sta_force_5ghz(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "40",
|
||||
"track_sta_max_num": "100" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2437, force_scan=True)
|
||||
|
@ -263,7 +263,7 @@ def _test_ap_track_sta_force_2ghz(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "6",
|
||||
"track_sta_max_num": "100" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "track",
|
||||
|
@ -272,7 +272,7 @@ def _test_ap_track_sta_force_2ghz(dev, apdev):
|
|||
"channel": "40",
|
||||
"no_probe_resp_if_seen_on": apdev[0]['ifname'],
|
||||
"no_auth_if_seen_on": apdev[0]['ifname'] }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid2, freq=5200, force_scan=True)
|
||||
|
|
|
@ -37,7 +37,7 @@ def test_ap_vht80(dev, apdev):
|
|||
"ieee80211ac": "1",
|
||||
"vht_oper_chwidth": "1",
|
||||
"vht_oper_centr_freq_seg0_idx": "42" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5180")
|
||||
|
@ -119,7 +119,7 @@ def test_ap_vht80_params(dev, apdev):
|
|||
"vht_capab": "[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP0]",
|
||||
"vht_oper_centr_freq_seg0_idx": "42",
|
||||
"require_vht": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[1].connect("vht", key_mgmt="NONE", scan_freq="5180",
|
||||
disable_vht="1", wait_connect=False)
|
||||
|
@ -161,7 +161,7 @@ def test_ap_vht80_invalid(dev, apdev):
|
|||
"vht_oper_centr_freq_seg1_idx": "155",
|
||||
'ieee80211d': '1',
|
||||
'ieee80211h': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
# This fails due to unexpected seg1 configuration
|
||||
ev = hapd.wait_event(["AP-DISABLED"], timeout=5)
|
||||
if ev is None:
|
||||
|
@ -191,7 +191,7 @@ def test_ap_vht80_invalid2(dev, apdev):
|
|||
"vht_oper_centr_freq_seg0_idx": "46",
|
||||
'ieee80211d': '1',
|
||||
'ieee80211h': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
# This fails due to invalid seg0 configuration
|
||||
ev = hapd.wait_event(["AP-DISABLED"], timeout=5)
|
||||
if ev is None:
|
||||
|
@ -276,7 +276,7 @@ def test_ap_vht_capab_not_supported(dev, apdev):
|
|||
"vht_capab": "[MAX-MPDU-7991][MAX-MPDU-11454][VHT160][VHT160-80PLUS80][RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][RX-STBC-1][RX-STBC-12][RX-STBC-123][RX-STBC-1234][SU-BEAMFORMER][SU-BEAMFORMEE][BF-ANTENNA-2][BF-ANTENNA-3][BF-ANTENNA-4][SOUNDING-DIMENSION-2][SOUNDING-DIMENSION-3][SOUNDING-DIMENSION-4][MU-BEAMFORMER][VHT-TXOP-PS][HTC-VHT][MAX-A-MPDU-LEN-EXP0][MAX-A-MPDU-LEN-EXP7][VHT-LINK-ADAPT2][VHT-LINK-ADAPT3][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]",
|
||||
"vht_oper_centr_freq_seg0_idx": "42",
|
||||
"require_vht": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
ev = hapd.wait_event(["AP-DISABLED"], timeout=5)
|
||||
if ev is None:
|
||||
raise Exception("Startup failure not reported")
|
||||
|
@ -302,7 +302,7 @@ def test_ap_vht160(dev, apdev):
|
|||
"vht_oper_centr_freq_seg0_idx": "50",
|
||||
'ieee80211d': '1',
|
||||
'ieee80211h': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
|
||||
ev = wait_dfs_event(hapd, "DFS-CAC-START", 5)
|
||||
if "DFS-CAC-START" not in ev:
|
||||
|
@ -328,7 +328,7 @@ def test_ap_vht160(dev, apdev):
|
|||
"vht_oper_centr_freq_seg0_idx": "114",
|
||||
'ieee80211d': '1',
|
||||
'ieee80211h': '1' }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params, wait_enabled=False)
|
||||
|
||||
ev = wait_dfs_event(hapd2, "DFS-CAC-START", 5)
|
||||
if "DFS-CAC-START" not in ev:
|
||||
|
@ -417,7 +417,7 @@ def test_ap_vht160_no_dfs(dev, apdev):
|
|||
"vht_oper_centr_freq_seg0_idx": "114",
|
||||
'ieee80211d': '1',
|
||||
'ieee80211h': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
ev = hapd.wait_event(["AP-ENABLED"], timeout=2)
|
||||
if not ev:
|
||||
cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
|
||||
|
@ -463,7 +463,7 @@ def test_ap_vht80plus80(dev, apdev):
|
|||
"vht_oper_centr_freq_seg1_idx": "155",
|
||||
'ieee80211d': '1',
|
||||
'ieee80211h': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
# This will actually fail since DFS on 80+80 is not yet supported
|
||||
ev = hapd.wait_event(["AP-DISABLED"], timeout=5)
|
||||
# ignore result to avoid breaking the test once 80+80 DFS gets enabled
|
||||
|
@ -478,7 +478,7 @@ def test_ap_vht80plus80(dev, apdev):
|
|||
"vht_oper_chwidth": "3",
|
||||
"vht_oper_centr_freq_seg0_idx": "42",
|
||||
"vht_oper_centr_freq_seg1_idx": "155" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params, wait_enabled=False)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params, wait_enabled=False)
|
||||
|
||||
ev = hapd2.wait_event(["AP-ENABLED", "AP-DISABLED"], timeout=5)
|
||||
if not ev:
|
||||
|
@ -534,7 +534,7 @@ def test_ap_vht80plus80_invalid(dev, apdev):
|
|||
"vht_oper_centr_freq_seg1_idx": "0",
|
||||
'ieee80211d': '1',
|
||||
'ieee80211h': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
# This fails due to missing(invalid) seg1 configuration
|
||||
ev = hapd.wait_event(["AP-DISABLED"], timeout=5)
|
||||
if ev is None:
|
||||
|
@ -563,7 +563,7 @@ def test_ap_vht80_csa(dev, apdev):
|
|||
"ieee80211ac": "1",
|
||||
"vht_oper_chwidth": "1",
|
||||
"vht_oper_centr_freq_seg0_idx": "155" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5745")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
@ -614,7 +614,7 @@ def test_ap_vht_on_24ghz(dev, apdev):
|
|||
"vht_oper_chwidth": "0",
|
||||
"vht_oper_centr_freq_seg0_idx": "1"
|
||||
}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
try:
|
||||
if "OK" not in dev[0].request("VENDOR_ELEM_ADD 13 dd1300904c0400bf0c3240820feaff0000eaff0000"):
|
||||
raise Exception("Failed to add vendor element")
|
||||
|
@ -642,7 +642,7 @@ def test_prefer_vht40(dev, apdev):
|
|||
"channel": "36",
|
||||
"ieee80211n": "1",
|
||||
"ht_capab": "[HT40+]" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "test",
|
||||
|
@ -656,7 +656,7 @@ def test_prefer_vht40(dev, apdev):
|
|||
"vht_oper_chwidth": "0",
|
||||
"vht_oper_centr_freq_seg0_idx": "0",
|
||||
}
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=5180)
|
||||
|
@ -694,7 +694,7 @@ def test_ap_vht80_pwr_constraint(dev, apdev):
|
|||
"ieee80211ac": "1",
|
||||
"vht_oper_chwidth": "1",
|
||||
"vht_oper_centr_freq_seg0_idx": "42" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5180")
|
||||
except Exception, e:
|
||||
|
|
|
@ -28,7 +28,7 @@ def test_ap_vlan_open(dev, apdev):
|
|||
params = { "ssid": "test-vlan-open",
|
||||
"dynamic_vlan": "1",
|
||||
"accept_mac_file": "hostapd.accept" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -43,7 +43,7 @@ def test_ap_vlan_file_open(dev, apdev):
|
|||
"dynamic_vlan": "1",
|
||||
"vlan_file": "hostapd.vlan",
|
||||
"accept_mac_file": "hostapd.accept" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -58,7 +58,7 @@ def test_ap_vlan_wpa2(dev, apdev):
|
|||
passphrase="12345678")
|
||||
params['dynamic_vlan'] = "1";
|
||||
params['accept_mac_file'] = "hostapd.accept";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan", psk="12345678", scan_freq="2412")
|
||||
dev[1].connect("test-vlan", psk="12345678", scan_freq="2412")
|
||||
|
@ -71,7 +71,7 @@ def test_ap_vlan_wpa2_radius(dev, apdev):
|
|||
"""AP VLAN with WPA2-Enterprise and RADIUS attributes"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "1";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan1",
|
||||
|
@ -93,7 +93,7 @@ def test_ap_vlan_wpa2_radius_2(dev, apdev):
|
|||
"""AP VLAN with WPA2-Enterprise and RADIUS EGRESS_VLANID attributes"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "1";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan1b",
|
||||
|
@ -137,12 +137,12 @@ def generic_ap_vlan_wpa2_radius_id_change(dev, apdev, tagged):
|
|||
"ca_cert": "auth_serv/ca.pem",
|
||||
"server_cert": "auth_serv/server.pem",
|
||||
"private_key": "auth_serv/server.key" }
|
||||
authserv = hostapd.add_ap(apdev[1]['ifname'], as_params)
|
||||
authserv = hostapd.add_ap(apdev[1], as_params)
|
||||
|
||||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "1";
|
||||
params['auth_server_port'] = "18128"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
identity = "vlan1tagged" if tagged else "vlan1"
|
||||
|
||||
|
@ -230,7 +230,7 @@ def test_ap_vlan_wpa2_radius_required(dev, apdev):
|
|||
"""AP VLAN with WPA2-Enterprise and RADIUS attributes required"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "2";
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan1",
|
||||
|
@ -253,7 +253,7 @@ def test_ap_vlan_tagged(dev, apdev):
|
|||
"dynamic_vlan": "1",
|
||||
"vlan_tagged_interface": "lo",
|
||||
"accept_mac_file": "hostapd.accept" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -325,7 +325,7 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile):
|
|||
"server_cert": "auth_serv/server.pem",
|
||||
"private_key": "auth_serv/server.key",
|
||||
"vlan_naming": "1" }
|
||||
authserv = hostapd.add_ap(apdev[1]['ifname'], as_params)
|
||||
authserv = hostapd.add_ap(apdev[1], as_params)
|
||||
|
||||
ifname = apdev[0]['ifname']
|
||||
|
||||
|
@ -466,7 +466,7 @@ def test_ap_vlan_without_station(dev, apdev, p):
|
|||
params['dynamic_vlan'] = "1";
|
||||
params['vlan_file'] = 'hostapd.wlan3.vlan'
|
||||
params['accept_mac_file'] = "hostapd.accept";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
# inject some traffic
|
||||
sa = hapd.own_addr()
|
||||
|
@ -538,7 +538,7 @@ def test_ap_open_per_sta_vif(dev, apdev):
|
|||
"""AP VLAN with open network"""
|
||||
params = { "ssid": "test-vlan-open",
|
||||
"per_sta_vif": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity_iface(dev[0], hapd,
|
||||
|
@ -549,7 +549,7 @@ def test_ap_vlan_open_per_sta_vif(dev, apdev):
|
|||
params = { "ssid": "test-vlan-open",
|
||||
"per_sta_vif": "1",
|
||||
"dynamic_vlan": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity_iface(dev[0], hapd,
|
||||
|
@ -562,7 +562,7 @@ def test_ap_vlan_wpa2_radius_tagged(dev, apdev):
|
|||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "1"
|
||||
params["vlan_naming"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan1tagged",
|
||||
|
@ -587,7 +587,7 @@ def test_ap_vlan_wpa2_radius_mixed(dev, apdev):
|
|||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "1"
|
||||
params["vlan_naming"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan12mixed",
|
||||
|
@ -616,7 +616,7 @@ def test_ap_vlan_reconnect(dev, apdev):
|
|||
passphrase="12345678")
|
||||
params['dynamic_vlan'] = "1";
|
||||
params['accept_mac_file'] = "hostapd.accept";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
logger.info("connect sta")
|
||||
dev[0].connect("test-vlan", psk="12345678", scan_freq="2412")
|
||||
|
|
|
@ -41,7 +41,7 @@ def wps_start_ap(apdev, ssid="test-wps-conf"):
|
|||
def test_ap_wps_init(dev, apdev):
|
||||
"""Initial AP configuration with first WPS Enrollee"""
|
||||
ssid = "test-wps"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step")
|
||||
|
@ -98,8 +98,8 @@ def test_ap_wps_init_2ap_pbc(dev, apdev):
|
|||
"""Initial two-radio AP configuration with first WPS PBC Enrollee"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step")
|
||||
hapd.request("WPS_PBC")
|
||||
|
@ -135,8 +135,8 @@ def test_ap_wps_init_2ap_pin(dev, apdev):
|
|||
"""Initial two-radio AP configuration with first WPS PIN Enrollee"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step")
|
||||
pin = dev[0].wps_read_pin()
|
||||
|
@ -165,7 +165,7 @@ def test_ap_wps_init_2ap_pin(dev, apdev):
|
|||
def test_ap_wps_init_through_wps_config(dev, apdev):
|
||||
"""Initial AP configuration using wps_config command"""
|
||||
ssid = "test-wps-init-config"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
if "FAIL" in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "12345678".encode("hex")):
|
||||
|
@ -184,7 +184,7 @@ def test_ap_wps_init_through_wps_config(dev, apdev):
|
|||
def test_ap_wps_init_through_wps_config_2(dev, apdev):
|
||||
"""AP configuration using wps_config and wps_cred_processing=2"""
|
||||
ssid = "test-wps-init-config"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
||||
"wps_cred_processing": "2" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
@ -199,7 +199,7 @@ def test_ap_wps_init_through_wps_config_2(dev, apdev):
|
|||
def test_ap_wps_invalid_wps_config_passphrase(dev, apdev):
|
||||
"""AP configuration using wps_config command with invalid passphrase"""
|
||||
ssid = "test-wps-init-config"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
if "FAIL" not in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "1234567".encode("hex")):
|
||||
|
@ -208,7 +208,7 @@ def test_ap_wps_invalid_wps_config_passphrase(dev, apdev):
|
|||
def test_ap_wps_conf(dev, apdev):
|
||||
"""WPS PBC provisioning with configured AP"""
|
||||
ssid = "test-wps-conf"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -244,7 +244,7 @@ def test_ap_wps_conf_5ghz(dev, apdev):
|
|||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"country_code": "FI", "hw_mode": "a", "channel": "36" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
logger.info("WPS provisioning step")
|
||||
hapd.request("WPS_PBC")
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="5180")
|
||||
|
@ -270,7 +270,7 @@ def test_ap_wps_conf_chan14(dev, apdev):
|
|||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"country_code": "JP", "hw_mode": "b", "channel": "14" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
logger.info("WPS provisioning step")
|
||||
hapd.request("WPS_PBC")
|
||||
dev[0].request("WPS_PBC")
|
||||
|
@ -292,7 +292,7 @@ def test_ap_wps_twice(dev, apdev):
|
|||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step")
|
||||
hapd.request("WPS_PBC")
|
||||
|
@ -306,7 +306,7 @@ def test_ap_wps_twice(dev, apdev):
|
|||
hapd_global = hostapd.HostapdGlobal()
|
||||
hapd_global.remove(apdev[0]['ifname'])
|
||||
params['wpa_passphrase'] = 'another passphrase'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step")
|
||||
hapd.request("WPS_PBC")
|
||||
|
@ -320,7 +320,7 @@ def test_ap_wps_twice(dev, apdev):
|
|||
def test_ap_wps_incorrect_pin(dev, apdev):
|
||||
"""WPS PIN provisioning with incorrect PIN"""
|
||||
ssid = "test-wps-incorrect-pin"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -363,7 +363,7 @@ def test_ap_wps_incorrect_pin(dev, apdev):
|
|||
def test_ap_wps_conf_pin(dev, apdev):
|
||||
"""WPS PIN provisioning with configured AP"""
|
||||
ssid = "test-wps-conf-pin"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -402,7 +402,7 @@ def test_ap_wps_conf_pin(dev, apdev):
|
|||
def test_ap_wps_conf_pin_mixed_mode(dev, apdev):
|
||||
"""WPS PIN provisioning with configured AP (WPA+WPA2)"""
|
||||
ssid = "test-wps-conf-pin-mixed"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "3",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -460,7 +460,7 @@ def test_ap_wps_conf_pin_mixed_mode(dev, apdev):
|
|||
def test_ap_wps_conf_pin_v1(dev, apdev):
|
||||
"""WPS PIN provisioning with configured WPS v1.0 AP"""
|
||||
ssid = "test-wps-conf-pin-v1"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -486,7 +486,7 @@ def test_ap_wps_conf_pin_v1(dev, apdev):
|
|||
def test_ap_wps_conf_pin_2sta(dev, apdev):
|
||||
"""Two stations trying to use WPS PIN at the same time"""
|
||||
ssid = "test-wps-conf-pin2"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -508,7 +508,7 @@ def test_ap_wps_conf_pin_2sta(dev, apdev):
|
|||
def test_ap_wps_conf_pin_timeout(dev, apdev):
|
||||
"""WPS PIN provisioning with configured AP timing out PIN"""
|
||||
ssid = "test-wps-conf-pin"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -537,7 +537,7 @@ def test_ap_wps_reg_connect(dev, apdev):
|
|||
"""WPS registrar using AP PIN to connect"""
|
||||
ssid = "test-wps-reg-ap-pin"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -560,7 +560,7 @@ def test_ap_wps_reg_connect_mixed_mode(dev, apdev):
|
|||
"""WPS registrar using AP PIN to connect (WPA+WPA2)"""
|
||||
ssid = "test-wps-reg-ap-pin"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "3",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -595,12 +595,12 @@ def test_ap_wps_reg_override_ap_settings(dev, apdev):
|
|||
f.write(data)
|
||||
ssid = "test-wps-reg-ap-pin"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"ap_pin": appin, "ap_settings": ap_settings })
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test" })
|
||||
hapd2 = hostapd.add_ap(apdev[1], { "ssid": "test" })
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq=2412)
|
||||
dev[0].wps_reg(apdev[0]['bssid'], appin)
|
||||
|
@ -623,7 +623,7 @@ def test_ap_wps_random_ap_pin(dev, apdev):
|
|||
"""WPS registrar using random AP PIN"""
|
||||
ssid = "test-wps-reg-random-ap-pin"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -686,7 +686,7 @@ def test_ap_wps_reg_config(dev, apdev):
|
|||
"""WPS registrar configuring an AP using AP PIN"""
|
||||
ssid = "test-wps-init-ap-pin"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"ap_pin": appin})
|
||||
logger.info("WPS configuration step")
|
||||
|
@ -725,7 +725,7 @@ def test_ap_wps_reg_config_ext_processing(dev, apdev):
|
|||
appin = "12345670"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wps_cred_processing": "1", "ap_pin": appin}
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
new_ssid = "wps-new-ssid"
|
||||
new_passphrase = "1234567890"
|
||||
|
@ -749,7 +749,7 @@ def test_ap_wps_reg_config_tkip(dev, apdev):
|
|||
skip_with_fips(dev[0])
|
||||
ssid = "test-wps-init-ap"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
||||
"ap_pin": appin})
|
||||
logger.info("WPS configuration step")
|
||||
|
@ -780,7 +780,7 @@ def test_ap_wps_setup_locked(dev, apdev):
|
|||
"""WPS registrar locking up AP setup on AP PIN failures"""
|
||||
ssid = "test-wps-incorrect-ap-pin"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -847,7 +847,7 @@ def test_ap_wps_setup_locked_timeout(dev, apdev):
|
|||
"""WPS re-enabling AP PIN after timeout"""
|
||||
ssid = "test-wps-incorrect-ap-pin"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -890,7 +890,7 @@ def test_ap_wps_setup_locked_2(dev, apdev):
|
|||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"ap_pin": appin, "ap_setup_locked": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
new_ssid = "wps-new-ssid-test"
|
||||
new_passphrase = "1234567890"
|
||||
|
||||
|
@ -922,12 +922,12 @@ def test_ap_wps_setup_locked_2(dev, apdev):
|
|||
|
||||
def test_ap_wps_pbc_overlap_2ap(dev, apdev):
|
||||
"""WPS PBC session overlap with two active APs"""
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wps1", "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"wps_independent": "1"})
|
||||
hostapd.add_ap(apdev[1]['ifname'],
|
||||
hostapd.add_ap(apdev[1],
|
||||
{ "ssid": "wps2", "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "123456789", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -950,7 +950,7 @@ def test_ap_wps_pbc_overlap_2ap(dev, apdev):
|
|||
def test_ap_wps_pbc_overlap_2sta(dev, apdev):
|
||||
"""WPS PBC session overlap with two active STAs"""
|
||||
ssid = "test-wps-pbc-overlap"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -988,7 +988,7 @@ def test_ap_wps_pbc_overlap_2sta(dev, apdev):
|
|||
def test_ap_wps_cancel(dev, apdev):
|
||||
"""WPS AP cancelling enabled config method"""
|
||||
ssid = "test-wps-ap-cancel"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
||||
|
@ -1036,7 +1036,7 @@ def _test_ap_wps_er_add_enrollee(dev, apdev):
|
|||
ssid = "wps-er-add-enrollee"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1",
|
||||
"device_name": "Wireless AP", "manufacturer": "Company",
|
||||
"model_name": "WAP", "model_number": "123",
|
||||
|
@ -1169,7 +1169,7 @@ def _test_ap_wps_er_add_enrollee_uuid(dev, apdev):
|
|||
ssid = "wps-er-add-enrollee"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -1261,7 +1261,7 @@ def _test_ap_wps_er_multi_add_enrollee(dev, apdev):
|
|||
ssid = "wps-er-add-enrollee"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -1321,7 +1321,7 @@ def _test_ap_wps_er_add_enrollee_pbc(dev, apdev):
|
|||
ssid = "wps-er-add-enrollee-pbc"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -1392,7 +1392,7 @@ def _test_ap_wps_er_pbc_overlap(dev, apdev):
|
|||
ssid = "wps-er-add-enrollee-pbc"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -1467,7 +1467,7 @@ def _test_ap_wps_er_v10_add_enrollee_pin(dev, apdev):
|
|||
ssid = "wps-er-add-enrollee-pbc"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -1521,7 +1521,7 @@ def _test_ap_wps_er_config_ap(dev, apdev):
|
|||
ssid = "wps-er-ap-config"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -1584,7 +1584,7 @@ def _test_ap_wps_er_cache_ap_settings(dev, apdev):
|
|||
"os_version": "01020300",
|
||||
"config_methods": "label push_button",
|
||||
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
||||
id = int(dev[0].list_networks()[0]['id'])
|
||||
|
@ -1616,7 +1616,7 @@ def _test_ap_wps_er_cache_ap_settings(dev, apdev):
|
|||
if ev is None:
|
||||
raise Exception("AP removal or disconnection timed out")
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
for i in range(2):
|
||||
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
||||
timeout=15)
|
||||
|
@ -1663,7 +1663,7 @@ def _test_ap_wps_er_cache_ap_settings_oom(dev, apdev):
|
|||
"os_version": "01020300",
|
||||
"config_methods": "label push_button",
|
||||
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
||||
id = int(dev[0].list_networks()[0]['id'])
|
||||
|
@ -1696,7 +1696,7 @@ def _test_ap_wps_er_cache_ap_settings_oom(dev, apdev):
|
|||
if ev is None:
|
||||
raise Exception("AP removal or disconnection timed out")
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
for i in range(2):
|
||||
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
||||
timeout=15)
|
||||
|
@ -1725,7 +1725,7 @@ def _test_ap_wps_er_cache_ap_settings_oom2(dev, apdev):
|
|||
"os_version": "01020300",
|
||||
"config_methods": "label push_button",
|
||||
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
||||
id = int(dev[0].list_networks()[0]['id'])
|
||||
|
@ -1758,7 +1758,7 @@ def _test_ap_wps_er_cache_ap_settings_oom2(dev, apdev):
|
|||
if ev is None:
|
||||
raise Exception("AP removal or disconnection timed out")
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
for i in range(2):
|
||||
ev = dev[0].wait_event([ "WPS-ER-AP-ADD", "CTRL-EVENT-CONNECTED" ],
|
||||
timeout=15)
|
||||
|
@ -1787,7 +1787,7 @@ def _test_ap_wps_er_subscribe_oom(dev, apdev):
|
|||
"os_version": "01020300",
|
||||
"config_methods": "label push_button",
|
||||
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
||||
id = int(dev[0].list_networks()[0]['id'])
|
||||
|
@ -1826,7 +1826,7 @@ def _test_ap_wps_er_set_sel_reg_oom(dev, apdev):
|
|||
"os_version": "01020300",
|
||||
"config_methods": "label push_button",
|
||||
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
||||
|
||||
|
@ -1877,7 +1877,7 @@ def _test_ap_wps_er_learn_oom(dev, apdev):
|
|||
"os_version": "01020300",
|
||||
"config_methods": "label push_button",
|
||||
"ap_pin": ap_pin, "uuid": ap_uuid, "upnp_iface": "lo" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
|
||||
dev[0].wps_reg(apdev[0]['bssid'], ap_pin)
|
||||
|
||||
|
@ -1911,7 +1911,7 @@ def test_ap_wps_fragmentation(dev, apdev):
|
|||
"""WPS with fragmentation in EAP-WSC and mixed mode WPA+WPA2"""
|
||||
ssid = "test-wps-fragmentation"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "3",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -1963,7 +1963,7 @@ def test_ap_wps_fragmentation(dev, apdev):
|
|||
def test_ap_wps_new_version_sta(dev, apdev):
|
||||
"""WPS compatibility with new version number on the station"""
|
||||
ssid = "test-wps-ver"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
||||
|
@ -1980,7 +1980,7 @@ def test_ap_wps_new_version_sta(dev, apdev):
|
|||
def test_ap_wps_new_version_ap(dev, apdev):
|
||||
"""WPS compatibility with new version number on the AP"""
|
||||
ssid = "test-wps-ver"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
||||
|
@ -1997,7 +1997,7 @@ def test_ap_wps_new_version_ap(dev, apdev):
|
|||
|
||||
def test_ap_wps_check_pin(dev, apdev):
|
||||
"""Verify PIN checking through control interface"""
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wps", "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
|
||||
|
@ -2031,7 +2031,7 @@ def test_ap_wps_wep_config(dev, apdev):
|
|||
"""WPS 2.0 AP rejecting WEP configuration"""
|
||||
ssid = "test-wps-config"
|
||||
appin = "12345670"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"ap_pin": appin})
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
@ -2054,7 +2054,7 @@ def test_ap_wps_wep_config(dev, apdev):
|
|||
def test_ap_wps_wep_enroll(dev, apdev):
|
||||
"""WPS 2.0 STA rejecting WEP configuration"""
|
||||
ssid = "test-wps-wep"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"skip_cred_build": "1", "extra_cred": "wps-wep-cred" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
@ -2078,7 +2078,7 @@ def test_ap_wps_ie_fragmentation(dev, apdev):
|
|||
"model_name": "1234567890abcdef1234567890abcdef",
|
||||
"model_number": "1234567890abcdef1234567890abcdef",
|
||||
"serial_number": "1234567890abcdef1234567890abcdef" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
hapd.request("WPS_PBC")
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -2133,7 +2133,7 @@ def test_ap_wps_per_station_psk(dev, apdev):
|
|||
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
||||
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
||||
"wpa_psk_file": pskfile }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
logger.info("First enrollee")
|
||||
hapd.request("WPS_PBC")
|
||||
|
@ -2207,7 +2207,7 @@ def test_ap_wps_per_station_psk_failure(dev, apdev):
|
|||
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
||||
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
||||
"wpa_psk_file": pskfile }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" in hapd.request("SET wpa_psk_file /tmp/does/not/exists/ap_wps_per_enrollee_psk_failure.psk_file"):
|
||||
raise Exception("Failed to set wpa_psk_file")
|
||||
|
||||
|
@ -2240,7 +2240,7 @@ def test_ap_wps_pin_request_file(dev, apdev):
|
|||
pinfile = "/tmp/ap_wps_pin_request_file.log"
|
||||
if os.path.exists(pinfile):
|
||||
os.remove(pinfile)
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wps_pin_requests": pinfile,
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
|
@ -3435,7 +3435,7 @@ def test_ap_wps_upnp_http_proto_chunked(dev, apdev):
|
|||
def test_ap_wps_disabled(dev, apdev):
|
||||
"""WPS operations while WPS is disabled"""
|
||||
ssid = "test-wps-disabled"
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": ssid })
|
||||
hostapd.add_ap(apdev[0], { "ssid": ssid })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
if "FAIL" not in hapd.request("WPS_PBC"):
|
||||
raise Exception("WPS_PBC succeeded unexpectedly")
|
||||
|
@ -3445,7 +3445,7 @@ def test_ap_wps_disabled(dev, apdev):
|
|||
def test_ap_wps_mixed_cred(dev, apdev):
|
||||
"""WPS 2.0 STA merging mixed mode WPA/WPA2 credentials"""
|
||||
ssid = "test-wps-wep"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"skip_cred_build": "1", "extra_cred": "wps-mixed-cred" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
@ -3469,13 +3469,13 @@ def test_ap_wps_mixed_cred(dev, apdev):
|
|||
def test_ap_wps_while_connected(dev, apdev):
|
||||
"""WPS PBC provisioning while connected to another AP"""
|
||||
ssid = "test-wps-conf"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
logger.info("WPS provisioning step")
|
||||
|
@ -3490,13 +3490,13 @@ def test_ap_wps_while_connected(dev, apdev):
|
|||
def test_ap_wps_while_connected_no_autoconnect(dev, apdev):
|
||||
"""WPS PBC provisioning while connected to another AP and STA_AUTOCONNECT disabled"""
|
||||
ssid = "test-wps-conf"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "open" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "open" })
|
||||
|
||||
try:
|
||||
dev[0].request("STA_AUTOCONNECT 0")
|
||||
|
@ -3516,7 +3516,7 @@ def test_ap_wps_while_connected_no_autoconnect(dev, apdev):
|
|||
def test_ap_wps_from_event(dev, apdev):
|
||||
"""WPS PBC event on AP to enable PBC"""
|
||||
ssid = "test-wps-conf"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -3539,7 +3539,7 @@ def test_ap_wps_from_event(dev, apdev):
|
|||
def test_ap_wps_ap_scan_2(dev, apdev):
|
||||
"""AP_SCAN 2 for WPS"""
|
||||
ssid = "test-wps-conf"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -3571,7 +3571,7 @@ def test_ap_wps_ap_scan_2(dev, apdev):
|
|||
def test_ap_wps_eapol_workaround(dev, apdev):
|
||||
"""EAPOL workaround code path for 802.1X header length mismatch"""
|
||||
ssid = "test-wps"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
bssid = apdev[0]['bssid']
|
||||
|
@ -3591,13 +3591,13 @@ def test_ap_wps_eapol_workaround(dev, apdev):
|
|||
def test_ap_wps_iteration(dev, apdev):
|
||||
"""WPS PIN and iterate through APs without selected registrar"""
|
||||
ssid = "test-wps-conf"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
||||
ssid2 = "test-wps-conf2"
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'],
|
||||
hapd2 = hostapd.add_ap(apdev[1],
|
||||
{ "ssid": ssid2, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -3633,7 +3633,7 @@ def test_ap_wps_iteration(dev, apdev):
|
|||
def test_ap_wps_iteration_error(dev, apdev):
|
||||
"""WPS AP iteration on no Selected Registrar and error case with an AP"""
|
||||
ssid = "test-wps-conf-pin"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -3659,7 +3659,7 @@ def test_ap_wps_iteration_error(dev, apdev):
|
|||
# a case with an incorrectly behaving WPS AP.
|
||||
|
||||
# Start the real target AP and activate registrar on it.
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'],
|
||||
hapd2 = hostapd.add_ap(apdev[1],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -3678,7 +3678,7 @@ def test_ap_wps_iteration_error(dev, apdev):
|
|||
def test_ap_wps_priority(dev, apdev):
|
||||
"""WPS PIN provisioning with configured AP and wps_priority"""
|
||||
ssid = "test-wps-conf-pin"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -3702,10 +3702,10 @@ def test_ap_wps_priority(dev, apdev):
|
|||
def test_ap_wps_and_non_wps(dev, apdev):
|
||||
"""WPS and non-WPS AP in single hostapd process"""
|
||||
params = { "ssid": "wps", "eap_server": "1", "wps_state": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = { "ssid": "no wps" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
appin = hapd.request("WPS_AP_PIN random")
|
||||
if "FAIL" in appin:
|
||||
|
@ -3722,7 +3722,7 @@ def test_ap_wps_init_oom(dev, apdev):
|
|||
"""Initial AP configuration and OOM during PSK generation"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with alloc_fail(hapd, 1, "base64_encode;wps_build_cred"):
|
||||
pin = dev[0].wps_read_pin()
|
||||
|
@ -3747,7 +3747,7 @@ def _test_ap_wps_er_oom(dev, apdev):
|
|||
ssid = "wps-er-ap-config"
|
||||
ap_pin = "12345670"
|
||||
ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
|
@ -3831,7 +3831,7 @@ def test_ap_wps_wpa_cli_action(dev, apdev, test_params):
|
|||
stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
||||
|
||||
ssid = "test-wps-conf"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"})
|
||||
|
@ -4863,7 +4863,7 @@ def test_ap_wps_init_oom(dev, apdev):
|
|||
appin = "12345670"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"ap_pin": appin }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
pin = dev[0].wps_read_pin()
|
||||
|
||||
with alloc_fail(hapd, 1, "wps_init"):
|
||||
|
@ -4909,7 +4909,7 @@ def test_ap_wps_invalid_assoc_req_elem(dev, apdev):
|
|||
"""WPS and invalid IE in Association Request frame"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
pin = "12345670"
|
||||
hapd.request("WPS_PIN any " + pin)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -4930,7 +4930,7 @@ def test_ap_wps_pbc_pin_mismatch(dev, apdev):
|
|||
"""WPS PBC/PIN mismatch"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd.request("SET wps_version_number 0x10")
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
hapd.request("WPS_PBC")
|
||||
|
@ -4949,9 +4949,9 @@ def test_ap_wps_ie_invalid(dev, apdev):
|
|||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"vendor_elements": "dd050050f20410" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
params = { 'ssid': "another", "vendor_elements": "dd050050f20410" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
pin = dev[0].wps_read_pin()
|
||||
dev[0].request("WPS_PIN %s %s" % (apdev[0]['bssid'], pin))
|
||||
|
@ -4964,9 +4964,9 @@ def test_ap_wps_scan_prio_order(dev, apdev):
|
|||
"""WPS scan priority ordering"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
params = { 'ssid': "another", "vendor_elements": "dd050050f20410" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
||||
pin = dev[0].wps_read_pin()
|
||||
|
@ -4980,7 +4980,7 @@ def test_ap_wps_probe_req_ie_oom(dev, apdev):
|
|||
"""WPS ProbeReq IE OOM"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
pin = dev[0].wps_read_pin()
|
||||
hapd.request("WPS_PIN any " + pin)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -5008,7 +5008,7 @@ def test_ap_wps_assoc_req_ie_oom(dev, apdev):
|
|||
"""WPS AssocReq IE OOM"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
pin = dev[0].wps_read_pin()
|
||||
hapd.request("WPS_PIN any " + pin)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -5023,7 +5023,7 @@ def test_ap_wps_assoc_resp_ie_oom(dev, apdev):
|
|||
"""WPS AssocResp IE OOM"""
|
||||
ssid = "test-wps"
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
pin = dev[0].wps_read_pin()
|
||||
hapd.request("WPS_PIN any " + pin)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -5038,9 +5038,9 @@ def test_ap_wps_bss_info_errors(dev, apdev):
|
|||
"""WPS BSS info errors"""
|
||||
params = { "ssid": "1",
|
||||
"vendor_elements": "dd0e0050f20410440001ff101100010a" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
params = { 'ssid': "2", "vendor_elements": "dd050050f20410" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
||||
bss = dev[0].get_bss(apdev[0]['bssid'])
|
||||
|
@ -5198,7 +5198,7 @@ def test_ap_wps_random_psk_fail(dev, apdev):
|
|||
"wpa": "2", "wpa_key_mgmt": "WPA-PSK",
|
||||
"rsn_pairwise": "CCMP", "ap_pin": appin,
|
||||
"wpa_psk_file": pskfile }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
with fail_test(hapd, 1, "os_get_random;wps_build_cred_network_key"):
|
||||
|
@ -5843,12 +5843,12 @@ def test_ap_wps_config_methods(dev, apdev):
|
|||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"config_methods": "ethernet display ext_nfc_token int_nfc_token physical_display physical_push_button" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"config_methods": "display push_button" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
def test_ap_wps_set_selected_registrar_proto(dev, apdev):
|
||||
"""WPS UPnP SetSelectedRegistrar protocol testing"""
|
||||
|
@ -9328,7 +9328,7 @@ def test_ap_wps_eap_wsc_errors(dev, apdev):
|
|||
"wpa_passphrase": "12345678", "wpa": "2",
|
||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP",
|
||||
"fragment_size": "300", "ap_pin": appin }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
pin = dev[0].wps_read_pin()
|
||||
|
@ -9401,7 +9401,7 @@ def test_ap_wps_eap_wsc(dev, apdev):
|
|||
"""WPS and EAP-WSC in network profile"""
|
||||
params = int_eap_server_params()
|
||||
params["wps_state"] = "2"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
logger.info("Unexpected identity")
|
||||
|
|
|
@ -13,7 +13,7 @@ import hostapd
|
|||
|
||||
def test_autoscan_periodic(dev, apdev):
|
||||
"""autoscan_periodic"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "autoscan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "autoscan" })
|
||||
|
||||
try:
|
||||
if "OK" not in dev[0].request("AUTOSCAN periodic:1"):
|
||||
|
@ -53,7 +53,7 @@ def test_autoscan_periodic(dev, apdev):
|
|||
|
||||
def test_autoscan_exponential(dev, apdev):
|
||||
"""autoscan_exponential"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "autoscan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "autoscan" })
|
||||
|
||||
try:
|
||||
if "OK" not in dev[0].request("AUTOSCAN exponential:2:10"):
|
||||
|
|
|
@ -13,8 +13,8 @@ import hostapd
|
|||
|
||||
def test_bgscan_simple(dev, apdev):
|
||||
"""bgscan_simple"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "bgscan" })
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "bgscan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "bgscan" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "bgscan" })
|
||||
|
||||
dev[0].connect("bgscan", key_mgmt="NONE", scan_freq="2412",
|
||||
bgscan="simple:1:-20:2")
|
||||
|
@ -70,8 +70,8 @@ def test_bgscan_simple(dev, apdev):
|
|||
|
||||
def test_bgscan_learn(dev, apdev):
|
||||
"""bgscan_learn"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "bgscan" })
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "bgscan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "bgscan" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "bgscan" })
|
||||
|
||||
try:
|
||||
os.remove("/tmp/test_bgscan_learn.bgscan")
|
||||
|
|
|
@ -25,7 +25,7 @@ def nl80211_command(dev, cmd, attr):
|
|||
|
||||
def test_cfg80211_disassociate(dev, apdev):
|
||||
"""cfg80211 disassociation command"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5)
|
||||
if ev is None:
|
||||
|
@ -96,7 +96,7 @@ def test_cfg80211_tx_frame(dev, apdev, params):
|
|||
|
||||
def test_cfg80211_wep_key_idx_change(dev, apdev):
|
||||
"""WEP Shared Key authentication and key index change without deauth"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep-shared-key",
|
||||
"wep_key0": '"hello12345678"',
|
||||
"wep_key1": '"other12345678"',
|
||||
|
@ -125,7 +125,7 @@ def test_cfg80211_wep_key_idx_change(dev, apdev):
|
|||
|
||||
def test_cfg80211_hostapd_ext_sta_remove(dev, apdev):
|
||||
"""cfg80211 DEL_STATION issued externally to hostapd"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "open" })
|
||||
id = dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ def test_connect_cmd_open(dev, apdev):
|
|||
params = { "ssid": "sta-connect",
|
||||
"manage_p2p": "1",
|
||||
"allow_cross_connection": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -32,7 +32,7 @@ def test_connect_cmd_open(dev, apdev):
|
|||
def test_connect_cmd_wep(dev, apdev):
|
||||
"""WEP Open System using cfg80211 connect command"""
|
||||
params = { "ssid": "sta-connect-wep", "wep_key0": '"hello"' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -48,7 +48,7 @@ def test_connect_cmd_wep_shared(dev, apdev):
|
|||
"""WEP Shared key using cfg80211 connect command"""
|
||||
params = { "ssid": "sta-connect-wep", "wep_key0": '"hello"',
|
||||
"auth_algs": "2" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -71,7 +71,7 @@ def test_connect_cmd_p2p_management(dev, apdev):
|
|||
params = { "ssid": "sta-connect",
|
||||
"manage_p2p": "1",
|
||||
"allow_cross_connection": "0" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -84,7 +84,7 @@ def test_connect_cmd_p2p_management(dev, apdev):
|
|||
def test_connect_cmd_wpa2_psk(dev, apdev):
|
||||
"""WPA2-PSK connection using cfg80211 connect command"""
|
||||
params = hostapd.wpa2_params(ssid="sta-connect", passphrase="12345678")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -97,7 +97,7 @@ def test_connect_cmd_wpa2_psk(dev, apdev):
|
|||
def test_connect_cmd_concurrent_grpform_while_connecting(dev, apdev):
|
||||
"""Concurrent P2P group formation while connecting to an AP using cfg80211 connect command"""
|
||||
logger.info("Start connection to an infrastructure AP")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -124,7 +124,7 @@ def test_connect_cmd_reject_assoc(dev, apdev):
|
|||
"""Connection using cfg80211 connect command getting rejected"""
|
||||
params = { "ssid": "sta-connect",
|
||||
"require_ht": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -145,7 +145,7 @@ def test_connect_cmd_reject_assoc(dev, apdev):
|
|||
def test_connect_cmd_disconnect_event(dev, apdev):
|
||||
"""Connection using cfg80211 connect command getting disconnected by the AP"""
|
||||
params = { "ssid": "sta-connect" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -174,14 +174,14 @@ def test_connect_cmd_disconnect_event(dev, apdev):
|
|||
def test_connect_cmd_roam(dev, apdev):
|
||||
"""cfg80211 connect command to trigger roam"""
|
||||
params = { "ssid": "sta-connect" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
wpas.connect("sta-connect", key_mgmt="NONE", scan_freq="2412")
|
||||
wpas.dump_monitor()
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
wpas.scan_for_bss(apdev[1]['bssid'], freq=2412, force_scan=True)
|
||||
wpas.roam(apdev[1]['bssid'])
|
||||
time.sleep(0.1)
|
||||
|
|
|
@ -127,7 +127,7 @@ def test_dbus_getall(dev, apdev):
|
|||
if len(res) != 0:
|
||||
raise Exception("Unexpected Networks entry: " + str(res))
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
id = dev[0].add_network()
|
||||
|
@ -476,7 +476,7 @@ def test_dbus_wps_oom(dev, apdev):
|
|||
if_obj.Get(WPAS_DBUS_IFACE, "State",
|
||||
dbus_interface=dbus.PROPERTIES_IFACE)
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
|
||||
|
@ -991,7 +991,7 @@ def test_dbus_scan(dev, apdev):
|
|||
(bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
|
||||
iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE)
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
|
||||
class TestDbusScan(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
@ -1097,7 +1097,7 @@ def test_dbus_connect(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
class TestDbusConnect(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
@ -1200,7 +1200,7 @@ def test_dbus_connect_psk_mem(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
class TestDbusConnect(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
@ -1257,7 +1257,7 @@ def test_dbus_connect_oom(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
class TestDbusConnect(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
@ -1417,7 +1417,7 @@ def test_dbus_connect_eap(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = ssid
|
||||
params["ieee8021x"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
class TestDbusConnect(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
@ -1935,7 +1935,7 @@ def test_dbus_tdls_invalid(dev, apdev):
|
|||
(bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
|
||||
iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE)
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
connect_2sta_open(dev, hapd)
|
||||
addr1 = dev[1].p2p_interface_addr()
|
||||
|
||||
|
@ -1992,7 +1992,7 @@ def test_dbus_tdls(dev, apdev):
|
|||
(bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
|
||||
iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE)
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
connect_2sta_open(dev, hapd)
|
||||
|
||||
addr1 = dev[1].p2p_interface_addr()
|
||||
|
@ -4929,7 +4929,7 @@ def test_dbus_connect_wpa_eap(dev, apdev):
|
|||
params = hostapd.wpa_eap_params(ssid=ssid)
|
||||
params["wpa"] = "3"
|
||||
params["rsn_pairwise"] = "CCMP"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
class TestDbusConnect(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
@ -5033,7 +5033,7 @@ def test_dbus_expectdisconnect(dev, apdev):
|
|||
wpas = dbus.Interface(wpas_obj, WPAS_DBUS_SERVICE)
|
||||
|
||||
params = { "ssid": "test-open" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
# This does not really verify the behavior other than by going through the
|
||||
|
@ -5172,7 +5172,7 @@ def test_dbus_assoc_reject(dev, apdev):
|
|||
ssid = "test-open"
|
||||
params = { "ssid": ssid,
|
||||
"max_listen_interval": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
class TestDbusConnect(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
|
|
@ -111,11 +111,11 @@ def test_dbus_old_scan(dev, apdev):
|
|||
"""The old D-Bus interface - scanning"""
|
||||
(bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
|
||||
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||
params['wpa'] = '3'
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
class TestDbusScan(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
@ -401,7 +401,7 @@ def test_dbus_old_connect(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for p in [ "/no/where/to/be/found",
|
||||
path + "/Networks/12345",
|
||||
|
@ -570,7 +570,7 @@ def test_dbus_old_connect_eap(dev, apdev):
|
|||
|
||||
ssid = "test-wpa2-eap"
|
||||
params = hostapd.wpa2_eap_params(ssid=ssid)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
class TestDbusConnect(TestDbus):
|
||||
def __init__(self, bus):
|
||||
|
|
|
@ -222,7 +222,7 @@ def test_dfs_radar(dev, apdev):
|
|||
def test_dfs_radar_on_non_dfs_channel(dev, apdev):
|
||||
"""DFS radar detection test code on non-DFS channel"""
|
||||
params = { "ssid": "radar" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
hapd.request("RADAR DETECTED freq=5260 ht_enabled=1 chan_width=1")
|
||||
hapd.request("RADAR DETECTED freq=2412 ht_enabled=1 chan_width=1")
|
||||
|
|
|
@ -776,7 +776,7 @@ def test_eap_proto_sake_errors(dev, apdev):
|
|||
"""EAP-SAKE local error cases"""
|
||||
check_eap_capa(dev[0], "SAKE")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 3):
|
||||
with alloc_fail(dev[0], i, "eap_sake_init"):
|
||||
|
@ -1382,7 +1382,7 @@ def test_eap_proto_md5_errors(dev, apdev):
|
|||
"""EAP-MD5 local error cases"""
|
||||
check_eap_capa(dev[0], "MD5")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with fail_test(dev[0], 1, "chap_md5"):
|
||||
dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
|
@ -2276,7 +2276,7 @@ def test_eap_proto_eke_errors(dev, apdev):
|
|||
"""EAP-EKE local error cases"""
|
||||
check_eap_capa(dev[0], "EKE")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 3):
|
||||
with alloc_fail(dev[0], i, "eap_eke_init"):
|
||||
|
@ -2686,7 +2686,7 @@ def test_eap_proto_pax_errors(dev, apdev):
|
|||
"""EAP-PAX local error cases"""
|
||||
check_eap_capa(dev[0], "PAX")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 3):
|
||||
with alloc_fail(dev[0], i, "eap_pax_init"):
|
||||
|
@ -2860,7 +2860,7 @@ def test_eap_proto_psk_errors(dev, apdev):
|
|||
"""EAP-PSK local error cases"""
|
||||
check_eap_capa(dev[0], "PSK")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 3):
|
||||
with alloc_fail(dev[0], i, "eap_psk_init"):
|
||||
|
@ -4438,7 +4438,7 @@ def test_eap_proto_sim_errors(dev, apdev):
|
|||
"""EAP-SIM protocol tests (error paths)"""
|
||||
check_hlr_auc_gw_support()
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with alloc_fail(dev[0], 1, "eap_sim_init"):
|
||||
dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
|
@ -4552,7 +4552,7 @@ def test_eap_proto_sim_errors(dev, apdev):
|
|||
params = int_eap_server_params()
|
||||
params['eap_sim_db'] = "unix:/tmp/hlr_auc_gw.sock"
|
||||
params['eap_sim_aka_result_ind'] = "1"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
with alloc_fail(dev[0], 1,
|
||||
"eap_sim_msg_init;eap_sim_response_notification"):
|
||||
|
@ -4605,7 +4605,7 @@ def test_eap_proto_aka_errors(dev, apdev):
|
|||
"""EAP-AKA protocol tests (error paths)"""
|
||||
check_hlr_auc_gw_support()
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with alloc_fail(dev[0], 1, "eap_aka_init"):
|
||||
dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
|
@ -4640,7 +4640,7 @@ def test_eap_proto_aka_errors(dev, apdev):
|
|||
params = int_eap_server_params()
|
||||
params['eap_sim_db'] = "unix:/tmp/hlr_auc_gw.sock"
|
||||
params['eap_sim_aka_result_ind'] = "1"
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
with alloc_fail(dev[0], 1,
|
||||
"eap_sim_msg_init;eap_aka_response_notification"):
|
||||
|
@ -4692,7 +4692,7 @@ def test_eap_proto_aka_prime_errors(dev, apdev):
|
|||
"""EAP-AKA' protocol tests (error paths)"""
|
||||
check_hlr_auc_gw_support()
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with alloc_fail(dev[0], 1, "eap_aka_init"):
|
||||
dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
|
@ -5259,7 +5259,7 @@ def test_eap_proto_ikev2_errors(dev, apdev):
|
|||
"""EAP-IKEv2 local error cases"""
|
||||
check_eap_capa(dev[0], "IKEV2")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 5):
|
||||
with alloc_fail(dev[0], i, "eap_ikev2_init"):
|
||||
|
@ -5391,7 +5391,7 @@ def test_eap_proto_ikev2_errors(dev, apdev):
|
|||
"rsn_pairwise": "CCMP", "ieee8021x": "1",
|
||||
"eap_server": "1", "eap_user_file": "auth_serv/eap_user.conf",
|
||||
"fragment_size": "50" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
tests = [ (1, "eap_ikev2_build_frag_ack"),
|
||||
(1, "wpabuf_alloc;eap_ikev2_process_fragment") ]
|
||||
|
@ -6251,7 +6251,7 @@ def test_eap_proto_pwd_errors(dev, apdev):
|
|||
"""EAP-pwd local error cases"""
|
||||
check_eap_capa(dev[0], "PWD")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 4):
|
||||
with alloc_fail(dev[0], i, "eap_pwd_init"):
|
||||
|
@ -6404,7 +6404,7 @@ def test_eap_proto_pwd_errors(dev, apdev):
|
|||
"rsn_pairwise": "CCMP", "ieee8021x": "1",
|
||||
"eap_server": "1", "eap_user_file": "auth_serv/eap_user.conf",
|
||||
"pwd_group": "19", "fragment_size": "40" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
with alloc_fail(dev[0], 1, "wpabuf_alloc;=eap_pwd_process"):
|
||||
dev[0].connect("eap-test2", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
|
@ -6571,7 +6571,7 @@ def test_eap_proto_fast_errors(dev, apdev):
|
|||
"""EAP-FAST local error cases"""
|
||||
check_eap_capa(dev[0], "FAST")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 5):
|
||||
with alloc_fail(dev[0], i, "eap_fast_init"):
|
||||
|
@ -6755,7 +6755,7 @@ def test_eap_proto_peap_errors(dev, apdev):
|
|||
check_eap_capa(dev[0], "PEAP")
|
||||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 5):
|
||||
with alloc_fail(dev[0], i, "eap_peap_init"):
|
||||
|
@ -6833,7 +6833,7 @@ def test_eap_proto_ttls_errors(dev, apdev):
|
|||
check_eap_capa(dev[0], "TTLS")
|
||||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for i in range(1, 5):
|
||||
with alloc_fail(dev[0], i, "eap_ttls_init"):
|
||||
|
@ -7836,7 +7836,7 @@ def test_eap_proto_wsc(dev, apdev):
|
|||
def test_eap_canned_success_before_method(dev, apdev):
|
||||
"""EAP protocol tests for canned EAP-Success before any method"""
|
||||
params = int_eap_server_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
hapd.request("SET ext_eapol_frame_io 1")
|
||||
|
||||
|
@ -7862,7 +7862,7 @@ def test_eap_canned_success_before_method(dev, apdev):
|
|||
def test_eap_canned_failure_before_method(dev, apdev):
|
||||
"""EAP protocol tests for canned EAP-Failure before any method"""
|
||||
params = int_eap_server_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
hapd.request("SET ext_eapol_frame_io 1")
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
|
@ -7888,7 +7888,7 @@ def test_eap_nak_oom(dev, apdev):
|
|||
"""EAP-Nak OOM"""
|
||||
check_eap_capa(dev[0], "MD5")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
with alloc_fail(dev[0], 1, "eap_msg_alloc;eap_sm_buildNak"):
|
||||
dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
eap="MD5", identity="sake user", password="password",
|
||||
|
@ -7902,7 +7902,7 @@ def test_eap_nak_expanded(dev, apdev):
|
|||
check_eap_capa(dev[0], "MD5")
|
||||
check_eap_capa(dev[0], "VENDOR-TEST")
|
||||
params = hostapd.wpa2_eap_params(ssid="eap-test")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
eap="VENDOR-TEST WSC",
|
||||
identity="sake user", password="password",
|
||||
|
|
|
@ -25,7 +25,7 @@ def test_erp_initiate_reauth_start(dev, apdev):
|
|||
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||
params['erp_send_reauth_start'] = '1'
|
||||
params['erp_domain'] = 'example.com'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("ERP_FLUSH")
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP",
|
||||
|
@ -39,7 +39,7 @@ def test_erp_enabled_on_server(dev, apdev):
|
|||
params['erp_send_reauth_start'] = '1'
|
||||
params['erp_domain'] = 'example.com'
|
||||
params['eap_server_erp'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("ERP_FLUSH")
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP",
|
||||
|
@ -55,7 +55,7 @@ def test_erp(dev, apdev):
|
|||
params['erp_domain'] = 'example.com'
|
||||
params['eap_server_erp'] = '1'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("ERP_FLUSH")
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP",
|
||||
|
@ -81,7 +81,7 @@ def test_erp_server_no_match(dev, apdev):
|
|||
params['erp_domain'] = 'example.com'
|
||||
params['eap_server_erp'] = '1'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("ERP_FLUSH")
|
||||
id = dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP",
|
||||
|
@ -134,7 +134,7 @@ def test_erp_radius(dev, apdev):
|
|||
params['erp_send_reauth_start'] = '1'
|
||||
params['erp_domain'] = 'example.com'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("ERP_FLUSH")
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP",
|
||||
|
@ -187,7 +187,7 @@ def test_erp_radius_eap_methods(dev, apdev):
|
|||
params['erp_send_reauth_start'] = '1'
|
||||
params['erp_domain'] = 'example.com'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
erp_test(dev[0], hapd, eap="AKA", identity="0232010000000000@example.com",
|
||||
password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123")
|
||||
|
@ -235,7 +235,7 @@ def test_erp_key_lifetime_in_memory(dev, apdev, params):
|
|||
p['erp_domain'] = 'example.com'
|
||||
p['eap_server_erp'] = '1'
|
||||
p['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], p)
|
||||
hapd = hostapd.add_ap(apdev[0], p)
|
||||
password = "63d2d21ac3c09ed567ee004a34490f1d16e7fa5835edf17ddba70a63f1a90a25"
|
||||
|
||||
pid = find_wpas_process(dev[0])
|
||||
|
@ -424,7 +424,7 @@ def test_erp_anonymous_identity(dev, apdev):
|
|||
params['erp_domain'] = 'example.com'
|
||||
params['eap_server_erp'] = '1'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("ERP_FLUSH")
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
|
||||
|
@ -452,7 +452,7 @@ def test_erp_home_realm_oom(dev, apdev):
|
|||
params['erp_domain'] = 'example.com'
|
||||
params['eap_server_erp'] = '1'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for count in range(1, 3):
|
||||
with alloc_fail(dev[0], count, "eap_home_realm"):
|
||||
|
@ -509,7 +509,7 @@ def test_erp_local_errors(dev, apdev):
|
|||
params['erp_domain'] = 'example.com'
|
||||
params['eap_server_erp'] = '1'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("ERP_FLUSH")
|
||||
with alloc_fail(dev[0], 1, "eap_peer_erp_init"):
|
||||
|
|
|
@ -17,14 +17,14 @@ from test_ap_hs20 import interworking_connect
|
|||
def test_ext_password_psk(dev, apdev):
|
||||
"""External password storage for PSK"""
|
||||
params = hostapd.wpa2_params(ssid="ext-pw-psk", passphrase="12345678")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].request("SET ext_password_backend test:psk1=12345678")
|
||||
dev[0].connect("ext-pw-psk", raw_psk="ext:psk1", scan_freq="2412")
|
||||
|
||||
def test_ext_password_psk_not_found(dev, apdev):
|
||||
"""External password storage for PSK and PSK not found"""
|
||||
params = hostapd.wpa2_params(ssid="ext-pw-psk", passphrase="12345678")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].request("SET ext_password_backend test:psk1=12345678")
|
||||
dev[0].connect("ext-pw-psk", raw_psk="ext:psk2", scan_freq="2412",
|
||||
wait_connect=False)
|
||||
|
@ -56,7 +56,7 @@ def test_ext_password_psk_not_found(dev, apdev):
|
|||
def test_ext_password_eap(dev, apdev):
|
||||
"""External password storage for EAP password"""
|
||||
params = hostapd.wpa2_eap_params(ssid="ext-pw-eap")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].request("SET ext_password_backend test:pw0=hello|pw1=password|pw2=secret")
|
||||
dev[0].connect("ext-pw-eap", key_mgmt="WPA-EAP", eap="PEAP",
|
||||
identity="user", password_hex="ext:pw1",
|
||||
|
@ -68,7 +68,7 @@ def test_ext_password_interworking(dev, apdev):
|
|||
skip_with_fips(dev[0])
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].hs20_enable()
|
||||
dev[0].request("SET ext_password_backend test:pw1=password")
|
||||
|
|
|
@ -2344,7 +2344,7 @@ def fst_start_and_connect(apdev, group, sgroup):
|
|||
|
||||
params = { "ssid": "fst_11a", "hw_mode": "a", "channel": "36",
|
||||
"country_code": "US" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
fst_attach_ap(hglobal, apdev[0]['ifname'], group)
|
||||
|
||||
|
@ -2354,7 +2354,7 @@ def fst_start_and_connect(apdev, group, sgroup):
|
|||
|
||||
params = { "ssid": "fst_11g", "hw_mode": "g", "channel": "1",
|
||||
"country_code": "US" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
fst_attach_ap(hglobal, apdev[1]['ifname'], group)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
|
|
|
@ -106,7 +106,7 @@ def test_gas_generic(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
cmds = [ "foo",
|
||||
"00:11:22:33:44:55",
|
||||
|
@ -141,7 +141,7 @@ def test_gas_concurrent_scan(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
# get BSS entry available to allow GAS query
|
||||
dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
|
||||
|
@ -180,7 +180,7 @@ def test_gas_concurrent_connect(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
|
||||
|
||||
|
@ -773,7 +773,7 @@ def test_gas_unknown_adv_proto(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
|
||||
req = dev[0].request("GAS_REQUEST " + bssid + " 42 000102000101")
|
||||
|
@ -864,7 +864,7 @@ def test_gas_missing_payload(dev, apdev):
|
|||
bssid = apdev[0]['bssid']
|
||||
params = hs20_ap_params()
|
||||
params['hessid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
|
||||
|
||||
|
@ -989,7 +989,7 @@ def test_gas_anqp_extra_elements(dev, apdev):
|
|||
"275:01020304",
|
||||
"60000:01",
|
||||
"299:0102" ] }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
|
||||
|
|
|
@ -12,7 +12,7 @@ def test_hapd_ctrl_status(dev, apdev):
|
|||
ssid = "hapd-ctrl"
|
||||
bssid = apdev[0]['bssid']
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
status = hapd.get_status()
|
||||
driver = hapd.get_driver_status()
|
||||
|
||||
|
@ -37,7 +37,7 @@ def test_hapd_ctrl_p2p_manager(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['manage_p2p'] = '1'
|
||||
params['allow_cross_connection'] = '0'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
addr = dev[0].own_addr()
|
||||
if "OK" not in hapd.request("DEAUTHENTICATE " + addr + " p2p=2"):
|
||||
|
@ -55,7 +55,7 @@ def test_hapd_ctrl_sta(dev, apdev):
|
|||
ssid = "hapd-ctrl-sta"
|
||||
passphrase = "12345678"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
addr = dev[0].own_addr()
|
||||
if "FAIL" in hapd.request("STA " + addr):
|
||||
|
@ -77,7 +77,7 @@ def test_hapd_ctrl_disconnect(dev, apdev):
|
|||
ssid = "hapd-ctrl"
|
||||
passphrase = "12345678"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
addr = dev[0].p2p_dev_addr()
|
||||
|
||||
|
@ -101,7 +101,7 @@ def test_hapd_ctrl_chan_switch(dev, apdev):
|
|||
"""hostapd and CHAN_SWITCH ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("CHAN_SWITCH "):
|
||||
raise Exception("Unexpected CHAN_SWITCH success")
|
||||
if "FAIL" not in hapd.request("CHAN_SWITCH qwerty 2422"):
|
||||
|
@ -115,7 +115,7 @@ def test_hapd_ctrl_level(dev, apdev):
|
|||
"""hostapd and LEVEL ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("LEVEL 0"):
|
||||
raise Exception("Unexpected LEVEL success on non-monitor interface")
|
||||
|
||||
|
@ -123,7 +123,7 @@ def test_hapd_ctrl_new_sta(dev, apdev):
|
|||
"""hostapd and NEW_STA ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("NEW_STA 00:11:22:33:44"):
|
||||
raise Exception("Unexpected NEW_STA success")
|
||||
if "OK" not in hapd.request("NEW_STA 00:11:22:33:44:55"):
|
||||
|
@ -135,7 +135,7 @@ def test_hapd_ctrl_get(dev, apdev):
|
|||
"""hostapd and GET ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("GET foo"):
|
||||
raise Exception("Unexpected GET success")
|
||||
if "FAIL" in hapd.request("GET version"):
|
||||
|
@ -145,7 +145,7 @@ def test_hapd_ctrl_unknown(dev, apdev):
|
|||
"""hostapd and unknown ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "UNKNOWN COMMAND" not in hapd.request("FOO"):
|
||||
raise Exception("Unexpected response")
|
||||
|
||||
|
@ -153,7 +153,7 @@ def test_hapd_ctrl_hs20_wnm_notif(dev, apdev):
|
|||
"""hostapd and HS20_WNM_NOTIF ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("HS20_WNM_NOTIF 00:11:22:33:44 http://example.com/"):
|
||||
raise Exception("Unexpected HS20_WNM_NOTIF success")
|
||||
if "FAIL" not in hapd.request("HS20_WNM_NOTIF 00:11:22:33:44:55http://example.com/"):
|
||||
|
@ -163,7 +163,7 @@ def test_hapd_ctrl_hs20_deauth_req(dev, apdev):
|
|||
"""hostapd and HS20_DEAUTH_REQ ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("HS20_DEAUTH_REQ 00:11:22:33:44 1 120 http://example.com/"):
|
||||
raise Exception("Unexpected HS20_DEAUTH_REQ success")
|
||||
if "FAIL" not in hapd.request("HS20_DEAUTH_REQ 00:11:22:33:44:55"):
|
||||
|
@ -175,7 +175,7 @@ def test_hapd_ctrl_disassoc_imminent(dev, apdev):
|
|||
"""hostapd and DISASSOC_IMMINENT ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("DISASSOC_IMMINENT 00:11:22:33:44"):
|
||||
raise Exception("Unexpected DISASSOC_IMMINENT success")
|
||||
if "FAIL" not in hapd.request("DISASSOC_IMMINENT 00:11:22:33:44:55"):
|
||||
|
@ -194,7 +194,7 @@ def test_hapd_ctrl_ess_disassoc(dev, apdev):
|
|||
"""hostapd and ESS_DISASSOC ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
if "FAIL" not in hapd.request("ESS_DISASSOC 00:11:22:33:44"):
|
||||
raise Exception("Unexpected ESS_DISASSOCT success")
|
||||
if "FAIL" not in hapd.request("ESS_DISASSOC 00:11:22:33:44:55"):
|
||||
|
@ -217,7 +217,7 @@ def test_hapd_ctrl_set_deny_mac_file(dev, apdev):
|
|||
"""hostapd and SET deny_mac_file ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
if "OK" not in hapd.request("SET deny_mac_file hostapd.macaddr"):
|
||||
|
@ -231,7 +231,7 @@ def test_hapd_ctrl_set_accept_mac_file(dev, apdev):
|
|||
"""hostapd and SET accept_mac_file ctrl_iface command"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
hapd.request("SET macaddr_acl 1")
|
||||
|
@ -246,7 +246,7 @@ def test_hapd_ctrl_set_error_cases(dev, apdev):
|
|||
"""hostapd and SET error cases"""
|
||||
ssid = "hapd-ctrl"
|
||||
params = { "ssid": ssid }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
errors = [ "wpa_key_mgmt FOO",
|
||||
"wpa_key_mgmt WPA-PSK \t FOO",
|
||||
"wpa_key_mgmt \t ",
|
||||
|
@ -515,7 +515,7 @@ def test_hapd_dup_network_global_wpa(dev, apdev):
|
|||
|
||||
def test_hapd_ctrl_log_level(dev, apdev):
|
||||
"""hostapd ctrl_iface LOG_LEVEL"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
level = hapd.request("LOG_LEVEL")
|
||||
if "Current level: MSGDUMP" not in level:
|
||||
raise Exception("Unexpected debug level(1): " + level)
|
||||
|
|
|
@ -12,7 +12,7 @@ import hostapd
|
|||
from utils import HwsimSkip
|
||||
|
||||
def hostapd_oom_loop(apdev, params, start_func="main"):
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "ctrl" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "ctrl" })
|
||||
hapd_global = hostapd.HostapdGlobal()
|
||||
|
||||
count = 0
|
||||
|
@ -20,7 +20,7 @@ def hostapd_oom_loop(apdev, params, start_func="main"):
|
|||
if "OK" not in hapd.request("TEST_ALLOC_FAIL %d:%s" % (i, start_func)):
|
||||
raise HwsimSkip("TEST_ALLOC_FAIL not supported")
|
||||
try:
|
||||
hostapd.add_ap(apdev[1]['ifname'], params, timeout=2.5)
|
||||
hostapd.add_ap(apdev[1], params, timeout=2.5)
|
||||
logger.info("Iteration %d - success" % i)
|
||||
hapd_global.remove(apdev[1]['ifname'])
|
||||
|
||||
|
@ -68,7 +68,7 @@ def test_hostapd_oom_wpa2_eap_radius(dev, apdev):
|
|||
def test_hostapd_oom_wpa2_psk_connect(dev, apdev):
|
||||
"""hostapd failing during WPA2-PSK mode connection due to OOM"""
|
||||
params = hostapd.wpa2_params(ssid="test-wpa2-psk", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SCAN_INTERVAL 1")
|
||||
count = 0
|
||||
|
@ -114,7 +114,7 @@ def test_hostapd_oom_wpa2_eap_connect(dev, apdev, params):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SCAN_INTERVAL 1")
|
||||
count = 0
|
||||
|
|
|
@ -23,7 +23,7 @@ def test_ieee8021x_wep104(dev, apdev):
|
|||
params["ieee8021x"] = "1"
|
||||
params["wep_key_len_broadcast"] = "13"
|
||||
params["wep_key_len_unicast"] = "13"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="PSK",
|
||||
identity="psk.user@example.com",
|
||||
|
@ -39,7 +39,7 @@ def test_ieee8021x_wep40(dev, apdev):
|
|||
params["ieee8021x"] = "1"
|
||||
params["wep_key_len_broadcast"] = "5"
|
||||
params["wep_key_len_unicast"] = "5"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="PSK",
|
||||
identity="psk.user@example.com",
|
||||
|
@ -52,7 +52,7 @@ def test_ieee8021x_open(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = "ieee8021x-open"
|
||||
params["ieee8021x"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
id = dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
|
||||
eap="PSK", identity="psk.user@example.com",
|
||||
|
@ -78,7 +78,7 @@ def test_ieee8021x_static_wep40(dev, apdev):
|
|||
params["ssid"] = "ieee8021x-wep"
|
||||
params["ieee8021x"] = "1"
|
||||
params["wep_key0"] = '"hello"'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="PSK",
|
||||
identity="psk.user@example.com",
|
||||
|
@ -92,7 +92,7 @@ def test_ieee8021x_proto(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = "ieee8021x-open"
|
||||
params["ieee8021x"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[1].request("SET ext_eapol_frame_io 1")
|
||||
|
@ -138,7 +138,7 @@ def test_ieee8021x_eapol_start(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = "ieee8021x-open"
|
||||
params["ieee8021x"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
addr0 = dev[0].own_addr()
|
||||
|
||||
|
@ -172,7 +172,7 @@ def test_ieee8021x_held(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = "ieee8021x-open"
|
||||
params["ieee8021x"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
hapd.set("ext_eapol_frame_io", "1")
|
||||
|
@ -231,7 +231,7 @@ def test_ieee8021x_eapol_key(dev, apdev):
|
|||
params["ieee8021x"] = "1"
|
||||
params["wep_key_len_broadcast"] = "5"
|
||||
params["wep_key_len_unicast"] = "5"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="VENDOR-TEST",
|
||||
|
@ -271,7 +271,7 @@ def test_ieee8021x_reauth(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = "ieee8021x-open"
|
||||
params["ieee8021x"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
|
||||
eap="PSK", identity="psk.user@example.com",
|
||||
|
@ -293,7 +293,7 @@ def test_ieee8021x_set_conf(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = "ieee8021x-open"
|
||||
params["ieee8021x"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
|
||||
eap="PSK", identity="psk.user@example.com",
|
||||
|
@ -346,7 +346,7 @@ def test_ieee8021x_auth_awhile(dev, apdev):
|
|||
params["ssid"] = "ieee8021x-open"
|
||||
params["ieee8021x"] = "1"
|
||||
params['auth_server_port'] = "18129"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
addr0 = dev[0].own_addr()
|
||||
|
||||
|
@ -360,7 +360,7 @@ def test_ieee8021x_auth_awhile(dev, apdev):
|
|||
params['ca_cert'] = 'auth_serv/ca.pem'
|
||||
params['server_cert'] = 'auth_serv/server.pem'
|
||||
params['private_key'] = 'auth_serv/server.key'
|
||||
hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd1 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
|
||||
eap="PSK", identity="psk.user@example.com",
|
||||
|
|
|
@ -14,8 +14,8 @@ import time
|
|||
from tshark import run_tshark
|
||||
|
||||
def test_mbo_assoc_disallow(dev, apdev, params):
|
||||
hapd1 = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "MBO", "mbo": "1" })
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "MBO", "mbo": "1" })
|
||||
hapd1 = hostapd.add_ap(apdev[0], { "ssid": "MBO", "mbo": "1" })
|
||||
hapd2 = hostapd.add_ap(apdev[1], { "ssid": "MBO", "mbo": "1" })
|
||||
|
||||
logger.debug("Set mbo_assoc_disallow with invalid value")
|
||||
if "FAIL" not in hapd1.request("SET mbo_assoc_disallow 2"):
|
||||
|
@ -63,7 +63,7 @@ def test_mbo_cell_capa_update(dev, apdev):
|
|||
"""MBO cellular data capability update"""
|
||||
ssid = "test-wnm-mbo"
|
||||
params = { 'ssid': ssid, 'mbo': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
if "OK" not in dev[0].request("SET mbo_cell_capa 1"):
|
||||
raise Exception("Failed to set STA as cellular data capable")
|
||||
|
@ -93,7 +93,7 @@ def test_mbo_cell_capa_update_pmf(dev, apdev):
|
|||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256";
|
||||
params["ieee80211w"] = "2";
|
||||
params['mbo'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
if "OK" not in dev[0].request("SET mbo_cell_capa 1"):
|
||||
raise Exception("Failed to set STA as cellular data capable")
|
||||
|
@ -120,7 +120,7 @@ def test_mbo_non_pref_chan(dev, apdev):
|
|||
"""MBO non-preferred channel list"""
|
||||
ssid = "test-wnm-mbo"
|
||||
params = { 'ssid': ssid, 'mbo': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
if "OK" not in dev[0].request("SET non_pref_chan 81:7:200:3"):
|
||||
raise Exception("Failed to set non-preferred channel list")
|
||||
|
@ -203,7 +203,7 @@ def test_mbo_sta_supp_op_classes(dev, apdev):
|
|||
"""MBO STA supported operating classes"""
|
||||
ssid = "test-wnm-mbo"
|
||||
params = { 'ssid': ssid, 'mbo': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ def test_monitor_iface_wpa2_psk(dev, apdev):
|
|||
def test_monitor_iface_multi_bss(dev, apdev):
|
||||
"""AP mode mmonitor interface with hostapd multi-BSS setup"""
|
||||
params = { "ssid": "monitor-iface", "driver_params": "use_monitor=1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hostapd.add_bss('phy3', apdev[0]['ifname'] + '-2', 'bss-2.conf')
|
||||
dev[0].connect("monitor-iface", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect("bss-2", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -58,7 +58,7 @@ def test_monitor_iface_unknown_sta(dev, apdev):
|
|||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256"
|
||||
params["ieee80211w"] = "2"
|
||||
params['driver_params'] = "use_monitor=1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
bssid = apdev[0]['bssid']
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
|
|
|
@ -38,7 +38,7 @@ def test_nfc_wps_password_token_sta(dev, apdev):
|
|||
"""NFC tag with password token on the station/Enrollee"""
|
||||
ssid = "test-wps-nfc-pw-token-conf"
|
||||
params = ap_wps_params(ssid)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step using password token from station")
|
||||
wps = dev[0].request("WPS_NFC_TOKEN WPS").rstrip()
|
||||
|
@ -61,7 +61,7 @@ def test_nfc_wps_config_token(dev, apdev):
|
|||
"""NFC tag with configuration token from AP"""
|
||||
ssid = "test-wps-nfc-conf-token"
|
||||
params = ap_wps_params(ssid)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("NFC configuration token from AP to station")
|
||||
conf = hapd.request("WPS_NFC_CONFIG_TOKEN NDEF").rstrip()
|
||||
|
@ -82,7 +82,7 @@ def test_nfc_wps_config_token(dev, apdev):
|
|||
def test_nfc_wps_config_token_init(dev, apdev):
|
||||
"""NFC tag with configuration token from AP with auto configuration"""
|
||||
ssid = "test-wps-nfc-conf-token-init"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("NFC configuration token from AP to station")
|
||||
|
@ -99,7 +99,7 @@ def test_nfc_wps_config_token_init(dev, apdev):
|
|||
def test_nfc_wps_password_token_sta_init(dev, apdev):
|
||||
"""Initial AP configuration with first WPS NFC Enrollee"""
|
||||
ssid = "test-wps-nfc-pw-token-init"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS provisioning step using password token from station")
|
||||
|
@ -119,7 +119,7 @@ def test_nfc_wps_password_token_sta_init(dev, apdev):
|
|||
def test_nfc_wps_password_token_ap(dev, apdev):
|
||||
"""WPS registrar configuring an AP using AP password token"""
|
||||
ssid = "test-wps-nfc-pw-token-init"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("WPS configuration step")
|
||||
|
@ -162,7 +162,7 @@ def test_nfc_wps_handover_init(dev, apdev):
|
|||
def _test_nfc_wps_handover_init(dev, apdev):
|
||||
dev[0].request("SET ignore_old_scan_res 1")
|
||||
ssid = "test-wps-nfc-handover-init"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("NFC connection handover")
|
||||
|
@ -189,7 +189,7 @@ def _test_nfc_wps_handover_init(dev, apdev):
|
|||
def test_nfc_wps_handover_errors(dev, apdev):
|
||||
"""WPS AP NFC handover report error cases"""
|
||||
ssid = "test-wps-nfc-handover"
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": ssid, "eap_server": "1", "wps_state": "1" })
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
sel = hapd.request("NFC_GET_HANDOVER_SEL NDEF WPS-CR").rstrip()
|
||||
|
@ -220,7 +220,7 @@ def test_nfc_wps_handover(dev, apdev):
|
|||
"""Connect to WPS AP with NFC connection handover"""
|
||||
ssid = "test-wps-nfc-handover"
|
||||
params = ap_wps_params(ssid)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("NFC connection handover")
|
||||
req = dev[0].request("NFC_GET_HANDOVER_REQ NDEF WPS-CR").rstrip()
|
||||
|
@ -247,7 +247,7 @@ def test_nfc_wps_handover_5ghz(dev, apdev):
|
|||
params["country_code"] = "FI"
|
||||
params["hw_mode"] = "a"
|
||||
params["channel"] = "36"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
logger.info("NFC connection handover")
|
||||
req = dev[0].request("NFC_GET_HANDOVER_REQ NDEF WPS-CR").rstrip()
|
||||
if "FAIL" in req:
|
||||
|
@ -279,7 +279,7 @@ def test_nfc_wps_handover_chan14(dev, apdev):
|
|||
params["country_code"] = "JP"
|
||||
params["hw_mode"] = "b"
|
||||
params["channel"] = "14"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
logger.info("NFC connection handover")
|
||||
req = dev[0].request("NFC_GET_HANDOVER_REQ NDEF WPS-CR").rstrip()
|
||||
if "FAIL" in req:
|
||||
|
@ -307,7 +307,7 @@ def test_nfc_wps_handover_with_pw_token_set(dev, apdev):
|
|||
"""Connect to WPS AP with NFC connection handover (wps_nfc_* set)"""
|
||||
ssid = "test-wps-nfc-handover2"
|
||||
params = ap_wps_params(ssid)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
# enable a password token (which won't be used in this test case)
|
||||
pw = hapd.request("WPS_NFC_TOKEN NDEF").rstrip()
|
||||
|
@ -339,7 +339,7 @@ def test_nfc_wps_handover_pk_hash_mismatch_sta(dev, apdev):
|
|||
if "FAIL" in dev[0].request("SET wps_corrupt_pkhash 1"):
|
||||
raise Exception("Could not enable wps_corrupt_pkhash")
|
||||
params = ap_wps_params(ssid)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
logger.info("NFC connection handover")
|
||||
req = dev[0].request("NFC_GET_HANDOVER_REQ NDEF WPS-CR").rstrip()
|
||||
|
@ -365,7 +365,7 @@ def test_nfc_wps_handover_pk_hash_mismatch_ap(dev, apdev):
|
|||
"""WPS NFC connection handover with invalid pkhash from AP (negative)"""
|
||||
ssid = "wps-nfc-handover-pkhash-ap"
|
||||
params = ap_wps_params(ssid)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
if "FAIL" in hapd.request("SET wps_corrupt_pkhash 1"):
|
||||
raise Exception("Could not enable wps_corrupt_pkhash")
|
||||
|
|
|
@ -198,8 +198,8 @@ def test_autogo_following_bss(dev, apdev):
|
|||
|
||||
channels = { 3 : "2422", 5 : "2432", 9 : "2452" }
|
||||
for key in channels:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid" : 'ap-test',
|
||||
"channel" : str(key) })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid" : 'ap-test',
|
||||
"channel" : str(key) })
|
||||
dev[0].connect("ap-test", key_mgmt="NONE",
|
||||
scan_freq=str(channels[key]))
|
||||
res_go = autogo(dev[0])
|
||||
|
@ -215,7 +215,7 @@ def test_go_neg_with_bss_connected(dev, apdev):
|
|||
dev[1].flush_scan_cache()
|
||||
dev[0].request("SET p2p_no_group_iface 0")
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-2.4ghz', "channel": '5' })
|
||||
dev[0].connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2432")
|
||||
#dev[0] as GO
|
||||
|
@ -263,8 +263,8 @@ def test_autogo_with_bss_on_disallowed_chan(dev, apdev):
|
|||
raise Exception("New radio does not support MCC")
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
wpas.request("P2P_SET disallow_freq 2412")
|
||||
wpas.connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
|
||||
res = autogo(wpas)
|
||||
|
@ -287,7 +287,7 @@ def test_go_neg_with_bss_on_disallowed_chan(dev, apdev):
|
|||
raise Exception("New radio does not support MCC")
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-2.4ghz', "channel": '1' })
|
||||
# make sure PBC overlap from old test cases is not maintained
|
||||
dev[1].flush_scan_cache()
|
||||
|
@ -340,7 +340,7 @@ def test_autogo_force_diff_channel(dev, apdev):
|
|||
|
||||
wpas.request("SET p2p_no_group_iface 0")
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{"ssid" : 'ap-test', "channel" : '1'})
|
||||
wpas.connect("ap-test", key_mgmt = "NONE", scan_freq = "2412")
|
||||
wpas.dump_monitor()
|
||||
|
@ -368,7 +368,7 @@ def test_go_neg_forced_freq_diff_than_bss_freq(dev, apdev):
|
|||
|
||||
wpas.request("SET p2p_no_group_iface 0")
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "country_code": 'US',
|
||||
"ssid": 'bss-5ghz', "hw_mode": 'a',
|
||||
"channel": '40' })
|
||||
|
@ -410,8 +410,8 @@ def test_go_pref_chan_bss_on_diff_chan(dev, apdev):
|
|||
dev[0].request("SET p2p_no_group_iface 0")
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
dev[0].request("SET p2p_pref_chan 81:2")
|
||||
dev[0].connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
|
||||
res = autogo(dev[0])
|
||||
|
@ -433,8 +433,8 @@ def test_go_pref_chan_bss_on_disallowed_chan(dev, apdev):
|
|||
wpas.request("SET p2p_no_group_iface 0")
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
wpas.request("P2P_SET disallow_freq 2412")
|
||||
wpas.request("SET p2p_pref_chan 81:2")
|
||||
wpas.connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -597,7 +597,7 @@ def test_p2p_listen_chan_optimize(dev, apdev):
|
|||
channel = "1" if lfreq != '2412' else "6"
|
||||
freq = "2412" if lfreq != '2412' else "2437"
|
||||
params = { "ssid": "test-open", "channel": channel }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
id = wpas.connect("test-open", key_mgmt="NONE", scan_freq=freq)
|
||||
wpas.p2p_listen()
|
||||
|
@ -738,8 +738,8 @@ def _test_p2p_go_move_active(dev, apdev):
|
|||
dev[0].request("SET p2p_no_group_iface 0")
|
||||
try:
|
||||
dev[0].global_request("P2P_SET disallow_freq 2430-6000")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
dev[0].connect("ap-test", key_mgmt="NONE",
|
||||
scan_freq="2462")
|
||||
|
||||
|
@ -785,8 +785,8 @@ def _test_p2p_go_move_scm(dev, apdev):
|
|||
dev[0].request("SET p2p_no_group_iface 0")
|
||||
try:
|
||||
dev[0].global_request("P2P_SET disallow_freq 2430-6000")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
dev[0].connect("ap-test", key_mgmt="NONE",
|
||||
scan_freq="2462")
|
||||
|
||||
|
@ -849,8 +849,8 @@ def _test_p2p_go_move_scm_peer_supports(dev, apdev):
|
|||
if freq < 5000:
|
||||
raise Exception("Unexpected channel %d MHz - did not follow 5 GHz preference" % freq)
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
logger.info('Connecting client to to an AP on channel 11');
|
||||
dev[0].connect("ap-test", key_mgmt="NONE",
|
||||
scan_freq="2462")
|
||||
|
@ -899,8 +899,8 @@ def _test_p2p_go_move_scm_peer_does_not_support(dev, apdev):
|
|||
if freq < 5000:
|
||||
raise Exception("Unexpected channel %d MHz - did not follow 5 GHz preference" % freq)
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid" : 'ap-test',
|
||||
"channel" : '11' })
|
||||
logger.info('Connecting client to to an AP on channel 11');
|
||||
dev[0].connect("ap-test", key_mgmt="NONE",
|
||||
scan_freq="2462")
|
||||
|
@ -933,8 +933,8 @@ def _test_p2p_go_move_scm_multi(dev, apdev):
|
|||
dev[0].request("SET p2p_no_group_iface 0")
|
||||
try:
|
||||
dev[0].global_request("P2P_SET disallow_freq 2430-6000")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid" : 'ap-test-1',
|
||||
"channel" : '11' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid" : 'ap-test-1',
|
||||
"channel" : '11' })
|
||||
dev[0].connect("ap-test-1", key_mgmt="NONE",
|
||||
scan_freq="2462")
|
||||
|
||||
|
@ -966,8 +966,8 @@ def _test_p2p_go_move_scm_multi(dev, apdev):
|
|||
if freq != '2462':
|
||||
raise Exception("Unexpected freq after group reform=" + freq)
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid" : 'ap-test-2',
|
||||
"channel" : '6' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid" : 'ap-test-2',
|
||||
"channel" : '6' })
|
||||
dev[0].connect("ap-test-2", key_mgmt="NONE",
|
||||
scan_freq="2437")
|
||||
|
||||
|
@ -1007,8 +1007,8 @@ def test_p2p_delay_go_csa(dev, apdev, params):
|
|||
raise Exception("Peer " + addr1 + " not found")
|
||||
wpas.p2p_stop_find()
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'bss-2.4ghz',
|
||||
"channel": '1' })
|
||||
|
||||
wpas.connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ def test_concurrent_autogo(dev, apdev):
|
|||
"""Concurrent P2P autonomous GO"""
|
||||
logger.info("Connect to an infrastructure AP")
|
||||
dev[0].request("P2P_SET cross_connect 0")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -48,13 +48,13 @@ def test_concurrent_autogo_5ghz_ht40(dev, apdev):
|
|||
"channel": "153",
|
||||
"country_code": "US",
|
||||
"ht_capab": "[HT40-]" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-open-5",
|
||||
"hw_mode": "a",
|
||||
"channel": "149",
|
||||
"country_code": "US" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("P2P_SET cross_connect 0")
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq=5745)
|
||||
|
@ -96,7 +96,7 @@ def test_concurrent_autogo_5ghz_ht40(dev, apdev):
|
|||
def test_concurrent_autogo_crossconnect(dev, apdev):
|
||||
"""Concurrent P2P autonomous GO"""
|
||||
dev[0].global_request("P2P_SET cross_connect 1")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
dev[0].global_request("SET p2p_no_group_iface 0")
|
||||
|
@ -133,7 +133,7 @@ def test_concurrent_autogo_crossconnect(dev, apdev):
|
|||
def test_concurrent_p2pcli(dev, apdev):
|
||||
"""Concurrent P2P client join"""
|
||||
logger.info("Connect to an infrastructure AP")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -154,7 +154,7 @@ def test_concurrent_p2pcli(dev, apdev):
|
|||
def test_concurrent_grpform_go(dev, apdev):
|
||||
"""Concurrent P2P group formation to become GO"""
|
||||
logger.info("Connect to an infrastructure AP")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -172,7 +172,7 @@ def test_concurrent_grpform_go(dev, apdev):
|
|||
def test_concurrent_grpform_cli(dev, apdev):
|
||||
"""Concurrent P2P group formation to become P2P Client"""
|
||||
logger.info("Connect to an infrastructure AP")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -190,7 +190,7 @@ def test_concurrent_grpform_cli(dev, apdev):
|
|||
def test_concurrent_grpform_while_connecting(dev, apdev):
|
||||
"""Concurrent P2P group formation while connecting to an AP"""
|
||||
logger.info("Start connection to an infrastructure AP")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", wait_connect=False)
|
||||
|
||||
logger.info("Form a P2P group while connecting to an AP")
|
||||
|
@ -207,7 +207,7 @@ def test_concurrent_grpform_while_connecting(dev, apdev):
|
|||
def test_concurrent_grpform_while_connecting2(dev, apdev):
|
||||
"""Concurrent P2P group formation while connecting to an AP (2)"""
|
||||
logger.info("Start connection to an infrastructure AP")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", wait_connect=False)
|
||||
dev[1].flush_scan_cache()
|
||||
|
||||
|
@ -226,7 +226,7 @@ def test_concurrent_grpform_while_connecting2(dev, apdev):
|
|||
def test_concurrent_grpform_while_connecting3(dev, apdev):
|
||||
"""Concurrent P2P group formation while connecting to an AP (3)"""
|
||||
logger.info("Start connection to an infrastructure AP")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open" })
|
||||
dev[0].connect("test-open", key_mgmt="NONE", wait_connect=False)
|
||||
|
||||
logger.info("Form a P2P group while connecting to an AP")
|
||||
|
@ -244,7 +244,7 @@ def test_concurrent_grpform_while_connecting3(dev, apdev):
|
|||
def test_concurrent_persistent_group(dev, apdev):
|
||||
"""Concurrent P2P persistent group"""
|
||||
logger.info("Connect to an infrastructure AP")
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open", "channel": "2" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-open", "channel": "2" })
|
||||
dev[0].global_request("SET p2p_no_group_iface 0")
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2417")
|
||||
|
||||
|
@ -267,7 +267,7 @@ def test_concurrent_invitation_channel_mismatch(dev, apdev):
|
|||
dev[1].dump_monitor()
|
||||
|
||||
logger.info("Connect to an infrastructure AP")
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open", "channel": "2" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-open", "channel": "2" })
|
||||
dev[0].global_request("SET p2p_no_group_iface 0")
|
||||
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2417")
|
||||
invite(dev[1], dev[0], extra="freq=2412")
|
||||
|
|
|
@ -169,7 +169,7 @@ def run_p2p_device_nfc_invite(dev, apdev, no_group_iface):
|
|||
|
||||
def test_p2p_device_misuses(dev, apdev):
|
||||
"""cfg80211 P2P Device misuses"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
with HWSimRadio(use_p2p_device=True) as (radio, iface):
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add(iface)
|
||||
|
|
|
@ -613,7 +613,7 @@ def clear_pbc_overlap(dev, ifname):
|
|||
def test_grpform_pbc_overlap(dev, apdev):
|
||||
"""P2P group formation during PBC overlap"""
|
||||
params = { "ssid": "wps", "eap_server": "1", "wps_state": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd.request("WPS_PBC")
|
||||
time.sleep(0.1)
|
||||
|
||||
|
@ -653,7 +653,7 @@ def test_grpform_pbc_overlap_group_iface(dev, apdev):
|
|||
# update use this information.
|
||||
params = { "ssid": "wps", "eap_server": "1", "wps_state": "1",
|
||||
"beacon_int": "15", 'manage_p2p': '1' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd.request("WPS_PBC")
|
||||
|
||||
dev[0].request("SET p2p_no_group_iface 0")
|
||||
|
|
|
@ -139,7 +139,7 @@ def start_p2p(dev, apdev):
|
|||
params['channel'] = '6'
|
||||
elif peer['listen_freq'] == "2462":
|
||||
params['channel'] = '11'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
return addr0, bssid, hapd, int(params['channel'])
|
||||
|
||||
|
|
|
@ -1089,7 +1089,7 @@ def test_p2ps_channel_one_connected(dev, apdev):
|
|||
set_no_group_iface(dev[1], 0)
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-2.4ghz', "channel": '7' })
|
||||
dev[1].connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2442")
|
||||
|
||||
|
@ -1118,7 +1118,7 @@ def test_p2ps_channel_both_connected_same(dev, apdev):
|
|||
dev[2].flush_scan_cache()
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-2.4ghz', "channel": '6' })
|
||||
|
||||
dev[2].connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2437")
|
||||
|
@ -1149,10 +1149,10 @@ def test_p2ps_channel_both_connected_different(dev, apdev):
|
|||
set_no_group_iface(dev[1], 0)
|
||||
|
||||
try:
|
||||
hapd1 = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd1 = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-channel-3', "channel": '3' })
|
||||
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'],
|
||||
hapd2 = hostapd.add_ap(apdev[1],
|
||||
{ "ssid": 'bss-channel-10', "channel": '10' })
|
||||
|
||||
dev[0].connect("bss-channel-3", key_mgmt="NONE", scan_freq="2422")
|
||||
|
@ -1184,10 +1184,10 @@ def test_p2ps_channel_both_connected_different_mcc(dev, apdev):
|
|||
set_no_group_iface(dev[1], 0)
|
||||
|
||||
try:
|
||||
hapd1 = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd1 = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-channel-3', "channel": '3' })
|
||||
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'],
|
||||
hapd2 = hostapd.add_ap(apdev[1],
|
||||
{ "ssid": 'bss-channel-10', "channel": '10' })
|
||||
|
||||
dev[0].connect("bss-channel-3", key_mgmt="NONE", scan_freq="2422")
|
||||
|
@ -1245,7 +1245,7 @@ def test_p2ps_channel_sta_connected_disallow_freq(dev, apdev):
|
|||
|
||||
try:
|
||||
dev[0].global_request("P2P_SET disallow_freq 2437")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-channel-6', "channel": '6' })
|
||||
|
||||
dev[1].connect("bss-channel-6", key_mgmt="NONE", scan_freq="2437")
|
||||
|
@ -1283,7 +1283,7 @@ def test_p2ps_channel_sta_connected_disallow_freq_mcc(dev, apdev):
|
|||
|
||||
try:
|
||||
dev[0].global_request("P2P_SET disallow_freq 2437")
|
||||
hapd1 = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd1 = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-channel-6', "channel": '6' })
|
||||
|
||||
wpas.connect("bss-channel-6", key_mgmt="NONE", scan_freq="2437")
|
||||
|
@ -1366,7 +1366,7 @@ def test_p2ps_channel_active_go_and_station_same(dev, apdev):
|
|||
dev[2].global_request("P2P_SET listen_channel 11")
|
||||
dev[1].global_request("P2P_SET listen_channel 11")
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-channel-11', "channel": '11' })
|
||||
|
||||
dev[2].connect("bss-channel-11", key_mgmt="NONE", scan_freq="2462")
|
||||
|
@ -1403,7 +1403,7 @@ def test_p2ps_channel_active_go_and_station_different(dev, apdev):
|
|||
set_no_group_iface(dev[1], 0)
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-channel-2', "channel": '2' })
|
||||
|
||||
dev[0].connect("bss-channel-2", key_mgmt="NONE", scan_freq="2417")
|
||||
|
@ -1446,7 +1446,7 @@ def test_p2ps_channel_active_go_and_station_different_mcc(dev, apdev):
|
|||
set_no_group_iface(dev[1], 0)
|
||||
|
||||
try:
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": 'bss-channel-6', "channel": '6' })
|
||||
|
||||
dev[0].connect("bss-channel-6", key_mgmt="NONE", scan_freq="2437")
|
||||
|
|
|
@ -19,7 +19,7 @@ def test_peerkey(dev, apdev):
|
|||
passphrase = "12345678"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['peerkey'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412", peerkey=True)
|
||||
dev[1].connect(ssid, psk=passphrase, scan_freq="2412", peerkey=True)
|
||||
|
@ -38,7 +38,7 @@ def test_peerkey_unknown_peer(dev, apdev):
|
|||
passphrase = "12345678"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['peerkey'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412", peerkey=True)
|
||||
dev[1].connect(ssid, psk=passphrase, scan_freq="2412", peerkey=True)
|
||||
|
@ -58,7 +58,7 @@ def test_peerkey_pairwise_mismatch(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
params['peerkey'] = "1"
|
||||
params['rsn_pairwise'] = "TKIP CCMP"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412", peerkey=True,
|
||||
pairwise="CCMP")
|
||||
|
|
|
@ -18,7 +18,7 @@ from test_ap_eap import eap_connect
|
|||
def test_pmksa_cache_on_roam_back(dev, apdev):
|
||||
"""PMKSA cache to skip EAP on reassociation back to same AP"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk user",
|
||||
|
@ -30,7 +30,7 @@ def test_pmksa_cache_on_roam_back(dev, apdev):
|
|||
if pmksa['opportunistic'] != '0':
|
||||
raise Exception("Unexpected opportunistic PMKSA cache entry")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].dump_monitor()
|
||||
|
@ -82,14 +82,14 @@ def test_pmksa_cache_on_roam_back(dev, apdev):
|
|||
def test_pmksa_cache_and_reauth(dev, apdev):
|
||||
"""PMKSA caching and EAPOL reauthentication"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk user",
|
||||
password="abcdefghijklmnop0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].dump_monitor()
|
||||
|
@ -132,7 +132,7 @@ def test_pmksa_cache_and_reauth(dev, apdev):
|
|||
def test_pmksa_cache_opportunistic_only_on_sta(dev, apdev):
|
||||
"""Opportunistic PMKSA caching enabled only on station"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk user",
|
||||
|
@ -144,7 +144,7 @@ def test_pmksa_cache_opportunistic_only_on_sta(dev, apdev):
|
|||
if pmksa['opportunistic'] != '0':
|
||||
raise Exception("Unexpected opportunistic PMKSA cache entry")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].dump_monitor()
|
||||
|
@ -181,7 +181,7 @@ def test_pmksa_cache_opportunistic(dev, apdev):
|
|||
"""Opportunistic PMKSA caching"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
params['okc'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk user",
|
||||
|
@ -193,7 +193,7 @@ def test_pmksa_cache_opportunistic(dev, apdev):
|
|||
if pmksa['opportunistic'] != '0':
|
||||
raise Exception("Unexpected opportunistic PMKSA cache entry")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].dump_monitor()
|
||||
|
@ -231,7 +231,7 @@ def test_pmksa_cache_opportunistic_connect(dev, apdev):
|
|||
"""Opportunistic PMKSA caching with connect API"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
params['okc'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
@ -245,7 +245,7 @@ def test_pmksa_cache_opportunistic_connect(dev, apdev):
|
|||
if pmksa['opportunistic'] != '0':
|
||||
raise Exception("Unexpected opportunistic PMKSA cache entry")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
wpas.dump_monitor()
|
||||
|
@ -282,7 +282,7 @@ def test_pmksa_cache_opportunistic_connect(dev, apdev):
|
|||
def test_pmksa_cache_expiration(dev, apdev):
|
||||
"""PMKSA cache entry expiration"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].request("SET dot11RSNAConfigPMKLifetime 10")
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
|
@ -306,7 +306,7 @@ def test_pmksa_cache_expiration(dev, apdev):
|
|||
def test_pmksa_cache_expiration_disconnect(dev, apdev):
|
||||
"""PMKSA cache entry expiration (disconnect)"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].request("SET dot11RSNAConfigPMKLifetime 2")
|
||||
dev[0].request("SET dot11RSNAConfigPMKReauthThreshold 100")
|
||||
|
@ -340,7 +340,7 @@ def test_pmksa_cache_and_cui(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("cui", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk-cui",
|
||||
|
@ -392,7 +392,7 @@ def generic_pmksa_cache_preauth(dev, apdev, extraparams, identity, databridge,
|
|||
for key, value in extraparams[0].iteritems():
|
||||
params[key] = value
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
subprocess.call(['brctl', 'setfd', 'ap-br0', '0'])
|
||||
subprocess.call(['ip', 'link', 'set', 'dev', 'ap-br0', 'up'])
|
||||
eap_connect(dev[0], apdev[0], "PAX", identity,
|
||||
|
@ -407,7 +407,7 @@ def generic_pmksa_cache_preauth(dev, apdev, extraparams, identity, databridge,
|
|||
params['rsn_preauth_interfaces'] = databridge
|
||||
for key, value in extraparams[1].iteritems():
|
||||
params[key] = value
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid1 = apdev[1]['bssid']
|
||||
dev[0].scan(freq="2412")
|
||||
success = False
|
||||
|
@ -533,14 +533,14 @@ def test_pmksa_cache_disabled(dev, apdev):
|
|||
"""PMKSA cache disabling on AP"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk user",
|
||||
password="abcdefghijklmnop0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].dump_monitor()
|
||||
|
@ -569,7 +569,7 @@ def test_pmksa_cache_disabled(dev, apdev):
|
|||
def test_pmksa_cache_ap_expiration(dev, apdev):
|
||||
"""PMKSA cache entry expiring on AP"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk-user-session-timeout",
|
||||
|
@ -596,7 +596,7 @@ def test_pmksa_cache_ap_expiration(dev, apdev):
|
|||
def test_pmksa_cache_multiple_sta(dev, apdev):
|
||||
"""PMKSA cache with multiple stations"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk-user-session-timeout",
|
||||
|
@ -618,7 +618,7 @@ def test_pmksa_cache_multiple_sta(dev, apdev):
|
|||
password="abcdefghijklmnop0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
logger.info("Roam to AP2")
|
||||
|
@ -655,7 +655,7 @@ def test_pmksa_cache_opportunistic_multiple_sta(dev, apdev):
|
|||
"""Opportunistic PMKSA caching with multiple stations"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
params['okc'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5")
|
||||
|
@ -665,7 +665,7 @@ def test_pmksa_cache_opportunistic_multiple_sta(dev, apdev):
|
|||
password="abcdefghijklmnop0123456789abcdef", okc=True,
|
||||
scan_freq="2412")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
logger.info("Roam to AP2")
|
||||
|
@ -707,7 +707,7 @@ def test_pmksa_cache_preauth_oom(dev, apdev):
|
|||
def _test_pmksa_cache_preauth_oom(dev, apdev):
|
||||
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||
params['bridge'] = 'ap-br0'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
subprocess.call(['brctl', 'setfd', 'ap-br0', '0'])
|
||||
subprocess.call(['ip', 'link', 'set', 'dev', 'ap-br0', 'up'])
|
||||
eap_connect(dev[0], apdev[0], "PAX", "pax.user@example.com",
|
||||
|
@ -718,7 +718,7 @@ def _test_pmksa_cache_preauth_oom(dev, apdev):
|
|||
params['bridge'] = 'ap-br0'
|
||||
params['rsn_preauth'] = '1'
|
||||
params['rsn_preauth_interfaces'] = 'ap-br0'
|
||||
hapd = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[1], params)
|
||||
bssid1 = apdev[1]['bssid']
|
||||
|
||||
tests = [ (1, "rsn_preauth_receive"),
|
||||
|
@ -764,7 +764,7 @@ def test_pmksa_cache_size_limit(dev, apdev):
|
|||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
bssid = apdev[0]['bssid']
|
||||
params['bssid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
def _test_pmksa_cache_size_limit(dev, apdev):
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
|
@ -776,7 +776,7 @@ def _test_pmksa_cache_size_limit(dev, apdev):
|
|||
bssid = apdev[0]['bssid'][0:15] + "%02x" % i
|
||||
logger.info("Iteration with BSSID " + bssid)
|
||||
params['bssid'] = bssid
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].request("BSS_FLUSH 0")
|
||||
dev[0].scan_for_bss(bssid, freq=2412, only_new=True)
|
||||
dev[0].select_network(id)
|
||||
|
@ -805,7 +805,7 @@ def test_pmksa_cache_preauth_timeout(dev, apdev):
|
|||
def _test_pmksa_cache_preauth_timeout(dev, apdev):
|
||||
dev[0].request("SET dot11RSNAConfigSATimeout 1")
|
||||
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
eap_connect(dev[0], apdev[0], "PAX", "pax.user@example.com",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
bssid=apdev[0]['bssid'])
|
||||
|
@ -820,7 +820,7 @@ def _test_pmksa_cache_preauth_timeout(dev, apdev):
|
|||
def test_pmksa_cache_preauth_wpas_oom(dev, apdev):
|
||||
"""RSN pre-authentication OOM in wpa_supplicant"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
eap_connect(dev[0], apdev[0], "PAX", "pax.user@example.com",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
bssid=apdev[0]['bssid'])
|
||||
|
@ -837,7 +837,7 @@ def test_pmksa_cache_preauth_wpas_oom(dev, apdev):
|
|||
def test_pmksa_cache_ctrl(dev, apdev):
|
||||
"""PMKSA cache control interface operations"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
addr = dev[0].own_addr()
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ def test_ext_radio_work(dev, apdev):
|
|||
def test_radio_work_cancel(dev, apdev):
|
||||
"""Radio work items cancelled on interface removal"""
|
||||
params = hostapd.wpa2_params(ssid="radio", passphrase="12345678")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5")
|
||||
wpas.scan(freq="2412")
|
||||
|
|
|
@ -31,7 +31,7 @@ def test_radius_auth_unreachable(dev, apdev):
|
|||
"""RADIUS Authentication server unreachable"""
|
||||
params = hostapd.wpa2_eap_params(ssid="radius-auth")
|
||||
params['auth_server_port'] = "18139"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
connect(dev[0], "radius-auth", wait_connect=False)
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"])
|
||||
|
@ -53,7 +53,7 @@ def test_radius_auth_unreachable2(dev, apdev):
|
|||
params = hostapd.wpa2_eap_params(ssid="radius-auth")
|
||||
params['auth_server_addr'] = "192.168.213.17"
|
||||
params['auth_server_port'] = "18139"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
subprocess.call(['ip', 'ro', 'del', '192.168.213.17', 'dev', 'lo'])
|
||||
connect(dev[0], "radius-auth", wait_connect=False)
|
||||
|
@ -73,7 +73,7 @@ def test_radius_auth_unreachable3(dev, apdev):
|
|||
subprocess.call(['ip', 'ro', 'replace', 'blackhole', '192.168.213.18'])
|
||||
params = hostapd.wpa2_eap_params(ssid="radius-auth")
|
||||
params['auth_server_addr'] = "192.168.213.18"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
connect(dev[0], "radius-auth", wait_connect=False)
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"])
|
||||
|
@ -93,7 +93,7 @@ def test_radius_acct_unreachable(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "18139"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
connect(dev[0], "radius-acct")
|
||||
logger.info("Checking for RADIUS retries")
|
||||
|
@ -113,7 +113,7 @@ def test_radius_acct_unreachable2(dev, apdev):
|
|||
params['acct_server_addr'] = "192.168.213.17"
|
||||
params['acct_server_port'] = "18139"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
subprocess.call(['ip', 'ro', 'del', '192.168.213.17', 'dev', 'lo'])
|
||||
connect(dev[0], "radius-acct")
|
||||
|
@ -135,7 +135,7 @@ def test_radius_acct_unreachable3(dev, apdev):
|
|||
params['acct_server_addr'] = "192.168.213.18"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
connect(dev[0], "radius-acct")
|
||||
subprocess.call(['ip', 'ro', 'del', 'blackhole', '192.168.213.18'])
|
||||
|
@ -157,7 +157,7 @@ def test_radius_acct_unreachable4(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "18139"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
for i in range(20):
|
||||
connect(dev[0], "radius-acct")
|
||||
|
@ -174,7 +174,7 @@ def test_radius_acct(dev, apdev):
|
|||
params['acct_server_shared_secret'] = "radius"
|
||||
params['radius_auth_req_attr'] = [ "126:s:Operator", "77:s:testing" ]
|
||||
params['radius_acct_req_attr'] = [ "126:s:Operator", "77:s:testing" ]
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
connect(dev[0], "radius-acct")
|
||||
dev[1].connect("radius-acct", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
|
@ -218,7 +218,7 @@ def test_radius_acct_non_ascii_ssid(dev, apdev):
|
|||
params['acct_server_shared_secret'] = "radius"
|
||||
ssid2 = "740665007374"
|
||||
params['ssid2'] = ssid2
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid2=ssid2, key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
eap="PSK", identity="psk.user@example.com",
|
||||
password_hex="0123456789abcdef0123456789abcdef")
|
||||
|
@ -231,7 +231,7 @@ def test_radius_acct_pmksa_caching(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
connect(dev[0], "radius-acct")
|
||||
dev[1].connect("radius-acct", key_mgmt="WPA-EAP", scan_freq="2412",
|
||||
eap="PAX", identity="test-class",
|
||||
|
@ -273,7 +273,7 @@ def test_radius_acct_interim(dev, apdev):
|
|||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
params['radius_acct_interim_interval'] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
connect(dev[0], "radius-acct")
|
||||
logger.info("Checking for RADIUS counters")
|
||||
|
@ -292,7 +292,7 @@ def test_radius_acct_interim_unreachable(dev, apdev):
|
|||
params['acct_server_port'] = "18139"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
params['radius_acct_interim_interval'] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
start = hapd.get_mib()
|
||||
connect(dev[0], "radius-acct")
|
||||
logger.info("Waiting for interium accounting updates")
|
||||
|
@ -312,7 +312,7 @@ def test_radius_acct_interim_unreachable2(dev, apdev):
|
|||
# Use long enough interim update interval to allow RADIUS retransmission
|
||||
# case (3 seconds) to trigger first.
|
||||
params['radius_acct_interim_interval'] = "4"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
start = hapd.get_mib()
|
||||
connect(dev[0], "radius-acct")
|
||||
logger.info("Waiting for interium accounting updates")
|
||||
|
@ -341,7 +341,7 @@ def _test_radius_acct_ipaddr(dev, apdev):
|
|||
'proxy_arp': '1',
|
||||
'ap_isolate': '1',
|
||||
'bridge': 'ap-br0' }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||
hapd = hostapd.add_ap(apdev[0], params, no_enable=True)
|
||||
try:
|
||||
hapd.enable()
|
||||
except:
|
||||
|
@ -385,7 +385,7 @@ def test_radius_acct_psk(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("radius-acct", psk="12345678", scan_freq="2412")
|
||||
|
||||
def test_radius_acct_psk_sha256(dev, apdev):
|
||||
|
@ -396,7 +396,7 @@ def test_radius_acct_psk_sha256(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("radius-acct", key_mgmt="WPA-PSK-SHA256",
|
||||
psk="12345678", scan_freq="2412")
|
||||
|
||||
|
@ -407,7 +407,7 @@ def test_radius_acct_ft_psk(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("radius-acct", key_mgmt="FT-PSK",
|
||||
psk="12345678", scan_freq="2412")
|
||||
|
||||
|
@ -423,7 +423,7 @@ def test_radius_acct_ieee8021x(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("radius-acct-1x", key_mgmt="IEEE8021X", eap="PSK",
|
||||
identity="psk.user@example.com",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
|
@ -445,7 +445,7 @@ def test_radius_das_disconnect(dev, apdev):
|
|||
params['radius_das_require_event_timestamp'] = "1"
|
||||
params['own_ip_addr'] = "127.0.0.1"
|
||||
params['nas_identifier'] = "nas.example.com"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
connect(dev[0], "radius-das")
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
sta = hapd.get_sta(addr)
|
||||
|
@ -742,7 +742,7 @@ def test_radius_das_coa(dev, apdev):
|
|||
params['radius_das_port'] = "3799"
|
||||
params['radius_das_client'] = "127.0.0.1 secret"
|
||||
params['radius_das_require_event_timestamp'] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
connect(dev[0], "radius-das")
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
sta = hapd.get_sta(addr)
|
||||
|
@ -776,7 +776,7 @@ def test_radius_ipv6(dev, apdev):
|
|||
params['ca_cert'] = 'auth_serv/ca.pem'
|
||||
params['server_cert'] = 'auth_serv/server.pem'
|
||||
params['private_key'] = 'auth_serv/server.key'
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = hostapd.wpa2_eap_params(ssid="radius-ipv6")
|
||||
params['auth_server_addr'] = "::0"
|
||||
|
@ -785,7 +785,7 @@ def test_radius_ipv6(dev, apdev):
|
|||
params['acct_server_port'] = "18139"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
params['own_ip_addr'] = "::0"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
connect(dev[0], "radius-ipv6")
|
||||
|
||||
def test_radius_macacl(dev, apdev):
|
||||
|
@ -793,7 +793,7 @@ def test_radius_macacl(dev, apdev):
|
|||
params = hostapd.radius_params()
|
||||
params["ssid"] = "radius"
|
||||
params["macaddr_acl"] = "2"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("radius", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
def test_radius_macacl_acct(dev, apdev):
|
||||
|
@ -804,7 +804,7 @@ def test_radius_macacl_acct(dev, apdev):
|
|||
params['acct_server_addr'] = "127.0.0.1"
|
||||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "radius"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("radius", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect("radius", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].request("DISCONNECT")
|
||||
|
@ -824,7 +824,7 @@ def test_radius_failover(dev, apdev):
|
|||
params['acct_server_port'] = "1813"
|
||||
params['acct_server_shared_secret'] = "testing"
|
||||
params['radius_retry_primary_interval'] = "20"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params, no_enable=True)
|
||||
hapd = hostapd.add_ap(apdev[0], params, no_enable=True)
|
||||
hapd.set("auth_server_addr", "127.0.0.1")
|
||||
hapd.set("auth_server_port", "1812")
|
||||
hapd.set("auth_server_shared_secret", "radius")
|
||||
|
@ -948,7 +948,7 @@ def test_radius_protocol(dev, apdev):
|
|||
try:
|
||||
params = hostapd.wpa2_eap_params(ssid="radius-test")
|
||||
params['auth_server_port'] = "18138"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
connect(dev[0], "radius-test", wait_connect=False)
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=15)
|
||||
if ev is None:
|
||||
|
@ -1058,7 +1058,7 @@ def test_radius_psk(dev, apdev):
|
|||
params['macaddr_acl'] = '2'
|
||||
params['wpa_psk_radius'] = '2'
|
||||
params['auth_server_port'] = "18138"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk="12345678", scan_freq="2412")
|
||||
t_events['long'].set()
|
||||
dev[1].connect(ssid, psk="0123456789abcdef", scan_freq="2412")
|
||||
|
@ -1070,7 +1070,7 @@ def test_radius_auth_force_client_addr(dev, apdev):
|
|||
"""RADIUS client address specified"""
|
||||
params = hostapd.wpa2_eap_params(ssid="radius-auth")
|
||||
params['radius_client_addr'] = "127.0.0.1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
connect(dev[0], "radius-auth")
|
||||
|
||||
def test_radius_auth_force_invalid_client_addr(dev, apdev):
|
||||
|
@ -1078,7 +1078,7 @@ def test_radius_auth_force_invalid_client_addr(dev, apdev):
|
|||
params = hostapd.wpa2_eap_params(ssid="radius-auth")
|
||||
#params['radius_client_addr'] = "10.11.12.14"
|
||||
params['radius_client_addr'] = "1::2"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
connect(dev[0], "radius-auth", wait_connect=False)
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"])
|
||||
if ev is None:
|
||||
|
@ -1208,7 +1208,7 @@ def test_ap_vlan_wpa2_psk_radius_required(dev, apdev):
|
|||
params['dynamic_vlan'] = "2"
|
||||
params['wpa_passphrase'] = '0123456789abcdefghi'
|
||||
params['auth_server_port'] = "18138"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
logger.info("connecting without VLAN")
|
||||
dev[0].connect(ssid, psk="0123456789abcdefghi", scan_freq="2412",
|
||||
|
|
|
@ -30,7 +30,7 @@ def test_rfkill_open(dev, apdev):
|
|||
"""rfkill block/unblock during open mode connection"""
|
||||
rfk = get_rfkill(dev[0])
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
try:
|
||||
logger.info("rfkill block")
|
||||
|
@ -62,7 +62,7 @@ def test_rfkill_wpa2_psk(dev, apdev):
|
|||
ssid = "test-wpa2-psk"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
|
||||
try:
|
||||
logger.info("rfkill block")
|
||||
|
@ -182,7 +182,7 @@ def test_rfkill_p2p_discovery_p2p_dev(dev, apdev):
|
|||
|
||||
def test_rfkill_hostapd(dev, apdev):
|
||||
"""rfkill block/unblock during and prior to hostapd operations"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
|
||||
rfk = get_rfkill(hapd)
|
||||
|
||||
|
@ -211,7 +211,7 @@ def test_rfkill_hostapd(dev, apdev):
|
|||
hglobal.flush()
|
||||
hglobal.remove(apdev[0]['ifname'])
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open2" },
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open2" },
|
||||
no_enable=True)
|
||||
if "FAIL" not in hapd.request("ENABLE"):
|
||||
raise Exception("ENABLE succeeded unexpectedly (rfkill)")
|
||||
|
|
|
@ -23,7 +23,7 @@ def test_sae(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
key_mgmt = hapd.get_config()['key_mgmt']
|
||||
if key_mgmt.split(' ')[0] != "SAE":
|
||||
raise Exception("Unexpected GET_CONFIG(key_mgmt): " + key_mgmt)
|
||||
|
@ -46,7 +46,7 @@ def test_sae_password_ecc(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups 19")
|
||||
|
||||
|
@ -66,7 +66,7 @@ def test_sae_password_ffc(dev, apdev):
|
|||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
params['sae_groups'] = '22'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups 22")
|
||||
|
||||
|
@ -85,7 +85,7 @@ def test_sae_pmksa_caching(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups ")
|
||||
dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
|
||||
|
@ -108,7 +108,7 @@ def test_sae_pmksa_caching_disabled(dev, apdev):
|
|||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
params['disable_pmksa_caching'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups ")
|
||||
dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
|
||||
|
@ -142,7 +142,7 @@ def test_sae_groups(dev, apdev):
|
|||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
params['sae_groups'] = ' '.join(groups)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
for g in groups:
|
||||
logger.info("Testing SAE group " + g)
|
||||
|
@ -181,7 +181,7 @@ def test_sae_group_nego(dev, apdev):
|
|||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
params['sae_groups'] = '19'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups 25 26 20 19")
|
||||
dev[0].connect("test-sae-group-nego", psk="12345678", key_mgmt="SAE",
|
||||
|
@ -196,7 +196,7 @@ def test_sae_anti_clogging(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
params['sae_anti_clogging_threshold'] = '1'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups ")
|
||||
dev[1].request("SET sae_groups ")
|
||||
|
@ -217,7 +217,7 @@ def test_sae_forced_anti_clogging(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE WPA-PSK'
|
||||
params['sae_anti_clogging_threshold'] = '0'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
dev[2].connect("test-sae", psk="12345678", scan_freq="2412")
|
||||
for i in range(0, 2):
|
||||
dev[i].request("SET sae_groups ")
|
||||
|
@ -231,7 +231,7 @@ def test_sae_mixed(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE WPA-PSK'
|
||||
params['sae_anti_clogging_threshold'] = '0'
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[2].connect("test-sae", psk="12345678", scan_freq="2412")
|
||||
for i in range(0, 2):
|
||||
|
@ -246,7 +246,7 @@ def test_sae_missing_password(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups ")
|
||||
id = dev[0].connect("test-sae",
|
||||
|
@ -264,7 +264,7 @@ def test_sae_key_lifetime_in_memory(dev, apdev, params):
|
|||
password = "5ad144a7c1f5a5503baa6fa01dabc15b1843e8c01662d78d16b70b5cd23cf8b"
|
||||
p = hostapd.wpa2_params(ssid="test-sae", passphrase=password)
|
||||
p['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], p)
|
||||
hapd = hostapd.add_ap(apdev[0], p)
|
||||
|
||||
pid = find_wpas_process(dev[0])
|
||||
|
||||
|
@ -388,7 +388,7 @@ def test_sae_oom_wpas(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups 25")
|
||||
tls = dev[0].request("GET tls_library")
|
||||
|
@ -412,7 +412,7 @@ def test_sae_proto_ecc(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].request("SET sae_groups 19")
|
||||
|
@ -510,7 +510,7 @@ def test_sae_proto_ffc(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].request("SET sae_groups 2")
|
||||
|
@ -589,7 +589,7 @@ def test_sae_no_ffc_by_default(dev, apdev):
|
|||
raise HwsimSkip("SAE not supported")
|
||||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups 5")
|
||||
dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE", scan_freq="2412",
|
||||
|
@ -658,7 +658,7 @@ def test_sae_anti_clogging_proto(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae",
|
||||
passphrase="no-knowledge-of-passphrase")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
|
@ -699,7 +699,7 @@ def test_sae_no_random(dev, apdev):
|
|||
raise HwsimSkip("SAE not supported")
|
||||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups ")
|
||||
tests = [ (1, "os_get_random;sae_get_rand"),
|
||||
|
@ -720,7 +720,7 @@ def test_sae_pwe_failure(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
params['sae_groups'] = '19 5'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups 19")
|
||||
with fail_test(dev[0], 1, "hmac_sha256_vector;sae_derive_pwe_ecc"):
|
||||
|
@ -760,7 +760,7 @@ def test_sae_bignum_failure(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||
params['wpa_key_mgmt'] = 'SAE'
|
||||
params['sae_groups'] = '19 5 22'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].request("SET sae_groups 19")
|
||||
tests = [ (1, "crypto_bignum_init_set;get_rand_1_to_p_1"),
|
||||
|
|
|
@ -64,7 +64,7 @@ def check_scan_retry(dev, params, bssid):
|
|||
|
||||
def test_scan(dev, apdev):
|
||||
"""Control interface behavior on scan parameters"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
logger.info("Full scan")
|
||||
|
@ -88,8 +88,8 @@ def test_scan(dev, apdev):
|
|||
|
||||
def test_scan_tsf(dev, apdev):
|
||||
"""Scan and TSF updates from Beacon/Probe Response frames"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan",
|
||||
'beacon_int': "100" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan",
|
||||
'beacon_int': "100" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
tsf = []
|
||||
|
@ -112,7 +112,7 @@ def test_scan_tsf(dev, apdev):
|
|||
|
||||
def test_scan_only(dev, apdev):
|
||||
"""Control interface behavior on scan parameters with type=only"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
logger.info("Full scan")
|
||||
|
@ -136,7 +136,7 @@ def test_scan_only(dev, apdev):
|
|||
|
||||
def test_scan_external_trigger(dev, apdev):
|
||||
"""Avoid operations during externally triggered scan"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
subprocess.call(['iw', dev[0].ifname, 'scan', 'trigger'])
|
||||
check_scan(dev[0], "use_id=1", other_started=True)
|
||||
|
@ -147,7 +147,7 @@ def test_scan_bss_expiration_count(dev, apdev):
|
|||
raise Exception("Invalid BSS_EXPIRE_COUNT accepted")
|
||||
if "OK" not in dev[0].request("BSS_EXPIRE_COUNT 2"):
|
||||
raise Exception("BSS_EXPIRE_COUNT failed")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].scan(freq="2412", only_new=True)
|
||||
if bssid not in dev[0].request("SCAN_RESULTS"):
|
||||
|
@ -167,7 +167,7 @@ def test_scan_bss_expiration_age(dev, apdev):
|
|||
raise Exception("Invalid BSS_EXPIRE_AGE accepted")
|
||||
if "OK" not in dev[0].request("BSS_EXPIRE_AGE 10"):
|
||||
raise Exception("BSS_EXPIRE_AGE failed")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
# Allow couple more retries to avoid reporting errors during heavy load
|
||||
for i in range(5):
|
||||
|
@ -195,9 +195,9 @@ def test_scan_filter(dev, apdev):
|
|||
if "OK" not in dev[0].request("SET filter_ssids 1"):
|
||||
raise Exception("SET failed")
|
||||
id = dev[0].connect("test-scan", key_mgmt="NONE", only_add_network=True)
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-scan2" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "test-scan2" })
|
||||
bssid2 = apdev[1]['bssid']
|
||||
dev[0].scan(freq="2412", only_new=True)
|
||||
if bssid not in dev[0].request("SCAN_RESULTS"):
|
||||
|
@ -241,9 +241,9 @@ def test_scan_int(dev, apdev):
|
|||
|
||||
def test_scan_bss_operations(dev, apdev):
|
||||
"""Control interface behavior on BSS parameters"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test2-scan" })
|
||||
hostapd.add_ap(apdev[1], { "ssid": "test2-scan" })
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
dev[0].scan(freq="2412")
|
||||
|
@ -348,7 +348,7 @@ def test_scan_and_interface_disabled(dev, apdev):
|
|||
|
||||
def test_scan_for_auth(dev, apdev):
|
||||
"""cfg80211 workaround with scan-for-auth"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
# Block sme-connect radio work with an external radio work item, so that
|
||||
# SELECT_NETWORK can decide to use fast associate without a new scan while
|
||||
|
@ -378,7 +378,7 @@ def test_scan_for_auth(dev, apdev):
|
|||
|
||||
def test_scan_for_auth_fail(dev, apdev):
|
||||
"""cfg80211 workaround with scan-for-auth failing"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
# Block sme-connect radio work with an external radio work item, so that
|
||||
# SELECT_NETWORK can decide to use fast associate without a new scan while
|
||||
|
@ -416,7 +416,7 @@ def test_scan_for_auth_fail(dev, apdev):
|
|||
def test_scan_for_auth_wep(dev, apdev):
|
||||
"""cfg80211 scan-for-auth workaround with WEP keys"""
|
||||
dev[0].flush_scan_cache()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep", "wep_key0": '"abcde"',
|
||||
"auth_algs": "2" })
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
@ -448,8 +448,8 @@ def test_scan_for_auth_wep(dev, apdev):
|
|||
|
||||
def test_scan_hidden(dev, apdev):
|
||||
"""Control interface behavior on scan parameters"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-scan",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
check_scan(dev[0], "freq=2412 use_id=1")
|
||||
|
@ -488,9 +488,9 @@ def test_scan_hidden(dev, apdev):
|
|||
|
||||
def test_scan_and_bss_entry_removed(dev, apdev):
|
||||
"""Last scan result and connect work processing on BSS entry update"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open",
|
||||
"eap_server": "1",
|
||||
"wps_state": "2" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open",
|
||||
"eap_server": "1",
|
||||
"wps_state": "2" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
|
@ -619,13 +619,13 @@ def test_scan_setband(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "36",
|
||||
"country_code": "US" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
params = { "ssid": "test-setband",
|
||||
"hw_mode": "g",
|
||||
"channel": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
if "FAIL" not in dev[0].request("SET setband FOO"):
|
||||
|
@ -688,8 +688,8 @@ def test_scan_hidden_many(dev, apdev):
|
|||
dev[0].request("SCAN_INTERVAL 5")
|
||||
|
||||
def _test_scan_hidden_many(dev, apdev):
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan-ssid",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-scan-ssid",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].request("SCAN_INTERVAL 1")
|
||||
|
@ -729,7 +729,7 @@ def test_scan_random_mac(dev, apdev, params):
|
|||
dev[0].request("MAC_RAND_SCAN all enable=0")
|
||||
|
||||
def _test_scan_random_mac(dev, apdev, params):
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
tests = [ "",
|
||||
|
@ -777,7 +777,7 @@ def _test_scan_random_mac(dev, apdev, params):
|
|||
|
||||
def test_scan_trigger_failure(dev, apdev):
|
||||
"""Scan trigger to the driver failing"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
if "OK" not in dev[0].request("SET test_failure 1"):
|
||||
|
@ -821,8 +821,8 @@ def test_scan_trigger_failure(dev, apdev):
|
|||
def test_scan_specify_ssid(dev, apdev):
|
||||
"""Control interface behavior on scan SSID parameter"""
|
||||
dev[0].flush_scan_cache()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-hidden",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-hidden",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
bssid = apdev[0]['bssid']
|
||||
check_scan(dev[0], "freq=2412 use_id=1 ssid 414243")
|
||||
bss = dev[0].get_bss(bssid)
|
||||
|
@ -896,12 +896,12 @@ def _test_scan_ap_scan_2_ap_mode(dev, apdev):
|
|||
def test_scan_bss_expiration_on_ssid_change(dev, apdev):
|
||||
"""BSS entry expiration when AP changes SSID"""
|
||||
dev[0].flush_scan_cache()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
||||
hapd.request("DISABLE")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
if "OK" not in dev[0].request("BSS_EXPIRE_COUNT 3"):
|
||||
raise Exception("BSS_EXPIRE_COUNT failed")
|
||||
dev[0].scan(freq="2412")
|
||||
|
@ -980,7 +980,7 @@ def test_scan_abort(dev, apdev):
|
|||
|
||||
def test_scan_abort_on_connect(dev, apdev):
|
||||
"""Aborting a full scan on connection request"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test-scan" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
|
|
|
@ -12,13 +12,13 @@ import hostapd
|
|||
|
||||
def test_ssid_hex_encoded(dev, apdev):
|
||||
"""SSID configuration using hex encoded version"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid2": '68656c6c6f' })
|
||||
hostapd.add_ap(apdev[0], { "ssid2": '68656c6c6f' })
|
||||
dev[0].connect("hello", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect(ssid2="68656c6c6f", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
def test_ssid_printf_encoded(dev, apdev):
|
||||
"""SSID configuration using printf encoded version"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid2": 'P"\\0hello\\nthere"' })
|
||||
hostapd.add_ap(apdev[0], { "ssid2": 'P"\\0hello\\nthere"' })
|
||||
dev[0].connect(ssid2="0068656c6c6f0a7468657265", key_mgmt="NONE",
|
||||
scan_freq="2412")
|
||||
dev[1].connect(ssid2='P"\\x00hello\\nthere"', key_mgmt="NONE",
|
||||
|
@ -31,20 +31,20 @@ def test_ssid_printf_encoded(dev, apdev):
|
|||
|
||||
def test_ssid_1_octet(dev, apdev):
|
||||
"""SSID with one octet"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": '1' })
|
||||
hostapd.add_ap(apdev[0], { "ssid": '1' })
|
||||
dev[0].connect("1", key_mgmt="NONE", scan_freq="2412")
|
||||
|
||||
def test_ssid_32_octets(dev, apdev):
|
||||
"""SSID with 32 octets"""
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": '1234567890abcdef1234567890ABCDEF' })
|
||||
dev[0].connect("1234567890abcdef1234567890ABCDEF", key_mgmt="NONE",
|
||||
scan_freq="2412")
|
||||
|
||||
def test_ssid_utf8(dev, apdev):
|
||||
"""SSID with UTF8 encoding"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'testi-åäöÅÄÖ-testi',
|
||||
"utf8_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'testi-åäöÅÄÖ-testi',
|
||||
"utf8_ssid": "1" })
|
||||
dev[0].connect("testi-åäöÅÄÖ-testi", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect(ssid2="74657374692dc3a5c3a4c3b6c385c384c3962d7465737469",
|
||||
key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -71,8 +71,8 @@ def clear_scan_cache(hapd, dev):
|
|||
|
||||
def test_ssid_hidden(dev, apdev):
|
||||
"""Hidden SSID"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'secret',
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'secret',
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
dev[1].connect("secret", key_mgmt="NONE", scan_freq="2412",
|
||||
wait_connect=False)
|
||||
dev[0].connect("secret", key_mgmt="NONE", scan_freq="2412", scan_ssid="1")
|
||||
|
@ -83,8 +83,8 @@ def test_ssid_hidden(dev, apdev):
|
|||
|
||||
def test_ssid_hidden2(dev, apdev):
|
||||
"""Hidden SSID using zero octets as payload"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'secret2',
|
||||
"ignore_broadcast_ssid": "2" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": 'secret2',
|
||||
"ignore_broadcast_ssid": "2" })
|
||||
dev[1].connect("secret2", key_mgmt="NONE", scan_freq="2412",
|
||||
wait_connect=False)
|
||||
dev[0].connect("secret2", key_mgmt="NONE", scan_freq="2412", scan_ssid="1")
|
||||
|
@ -97,7 +97,7 @@ def test_ssid_hidden_wpa2(dev, apdev):
|
|||
"""Hidden SSID with WPA2-PSK"""
|
||||
params = hostapd.wpa2_params(ssid="secret", passphrase="12345678")
|
||||
params["ignore_broadcast_ssid"] = "1"
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[1].connect("secret", psk="12345678", scan_freq="2412",
|
||||
wait_connect=False)
|
||||
dev[0].connect("secret", psk="12345678", scan_freq="2412", scan_ssid="1")
|
||||
|
|
|
@ -16,7 +16,7 @@ from wpasupplicant import WpaSupplicant
|
|||
def test_sta_dynamic(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface"""
|
||||
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
logger.info("Create a dynamic wpa_supplicant interface and connect")
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
|
@ -26,7 +26,7 @@ def test_sta_dynamic(dev, apdev):
|
|||
|
||||
def test_sta_ap_scan_0(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface with AP_SCAN 0 connection"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
logger.info("Create a dynamic wpa_supplicant interface and connect")
|
||||
|
@ -48,7 +48,7 @@ def test_sta_ap_scan_0(dev, apdev):
|
|||
|
||||
def test_sta_ap_scan_2(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface with AP_SCAN 2 connection"""
|
||||
hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test" })
|
||||
hostapd.add_ap(apdev[0], { "ssid": "test" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
logger.info("Create a dynamic wpa_supplicant interface and connect")
|
||||
|
@ -80,7 +80,7 @@ def test_sta_ap_scan_2(dev, apdev):
|
|||
|
||||
def test_sta_ap_scan_2b(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface with AP_SCAN 2 operation"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test" })
|
||||
bssid = apdev[0]['bssid']
|
||||
|
||||
logger.info("Create a dynamic wpa_supplicant interface and connect")
|
||||
|
@ -113,7 +113,7 @@ def test_sta_ap_scan_2b(dev, apdev):
|
|||
def test_sta_dynamic_down_up(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface down/up"""
|
||||
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
logger.info("Create a dynamic wpa_supplicant interface and connect")
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
|
@ -131,7 +131,7 @@ def test_sta_dynamic_down_up(dev, apdev):
|
|||
def test_sta_dynamic_ext_mac_addr_change(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface with external MAC address change"""
|
||||
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
logger.info("Create a dynamic wpa_supplicant interface and connect")
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
|
@ -164,7 +164,7 @@ def test_sta_dynamic_ext_mac_addr_change(dev, apdev):
|
|||
def test_sta_dynamic_random_mac_addr(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface and random MAC address"""
|
||||
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5")
|
||||
|
@ -202,7 +202,7 @@ def test_sta_dynamic_random_mac_addr(dev, apdev):
|
|||
def test_sta_dynamic_random_mac_addr_keep_oui(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface and random MAC address (keep OUI)"""
|
||||
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5")
|
||||
|
@ -244,7 +244,7 @@ def test_sta_dynamic_random_mac_addr_keep_oui(dev, apdev):
|
|||
def test_sta_dynamic_random_mac_addr_scan(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface and random MAC address for scan"""
|
||||
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5")
|
||||
|
@ -261,7 +261,7 @@ def test_sta_dynamic_random_mac_addr_scan(dev, apdev):
|
|||
def test_sta_dynamic_random_mac_addr_scan_keep_oui(dev, apdev):
|
||||
"""Dynamically added wpa_supplicant interface and random MAC address for scan (keep OUI)"""
|
||||
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5")
|
||||
|
|
|
@ -54,7 +54,7 @@ def test_suite_b(dev, apdev):
|
|||
check_suite_b_capa(dev)
|
||||
dev[0].flush_scan_cache()
|
||||
params = suite_b_ap_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B", ieee80211w="2",
|
||||
openssl_ciphers="SUITEB128",
|
||||
|
@ -103,7 +103,7 @@ def test_suite_b_radius(dev, apdev):
|
|||
check_suite_b_capa(dev)
|
||||
dev[0].flush_scan_cache()
|
||||
params = suite_b_as_params()
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-suite-b",
|
||||
"wpa": "2",
|
||||
|
@ -116,7 +116,7 @@ def test_suite_b_radius(dev, apdev):
|
|||
'auth_server_port': "18129",
|
||||
'auth_server_shared_secret': "radius",
|
||||
'nas_identifier': "nas.w1.fi" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B", ieee80211w="2",
|
||||
openssl_ciphers="SUITEB128",
|
||||
|
@ -156,7 +156,7 @@ def test_suite_b_192(dev, apdev):
|
|||
check_suite_b_192_capa(dev)
|
||||
dev[0].flush_scan_cache()
|
||||
params = suite_b_192_ap_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B-192",
|
||||
ieee80211w="2",
|
||||
|
@ -196,7 +196,7 @@ def test_suite_b_192_radius(dev, apdev):
|
|||
params['server_cert'] = 'auth_serv/ec2-server.pem'
|
||||
params['private_key'] = 'auth_serv/ec2-server.key'
|
||||
params['openssl_ciphers'] = 'SUITEB192'
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
params = { "ssid": "test-suite-b",
|
||||
"wpa": "2",
|
||||
|
@ -209,7 +209,7 @@ def test_suite_b_192_radius(dev, apdev):
|
|||
'auth_server_port': "18129",
|
||||
'auth_server_shared_secret': "radius",
|
||||
'nas_identifier': "nas.w1.fi" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B-192",
|
||||
ieee80211w="2",
|
||||
|
@ -225,7 +225,7 @@ def test_suite_b_pmkid_failure(dev, apdev):
|
|||
check_suite_b_capa(dev)
|
||||
dev[0].flush_scan_cache()
|
||||
params = suite_b_ap_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with fail_test(dev[0], 1, "rsn_pmkid_suite_b"):
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B",
|
||||
|
@ -242,7 +242,7 @@ def test_suite_b_192_pmkid_failure(dev, apdev):
|
|||
check_suite_b_192_capa(dev)
|
||||
dev[0].flush_scan_cache()
|
||||
params = suite_b_192_ap_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with fail_test(dev[0], 1, "rsn_pmkid_suite_b"):
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B-192",
|
||||
|
@ -259,7 +259,7 @@ def test_suite_b_mic_failure(dev, apdev):
|
|||
check_suite_b_capa(dev)
|
||||
dev[0].flush_scan_cache()
|
||||
params = suite_b_ap_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with fail_test(dev[0], 1, "wpa_eapol_key_mic"):
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B",
|
||||
|
@ -278,7 +278,7 @@ def test_suite_b_192_mic_failure(dev, apdev):
|
|||
check_suite_b_capa(dev)
|
||||
dev[0].flush_scan_cache()
|
||||
params = suite_b_192_ap_params()
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
with fail_test(dev[0], 1, "wpa_eapol_key_mic"):
|
||||
dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B-192",
|
||||
|
|
|
@ -15,7 +15,7 @@ def test_tnc_peap_soh(dev, apdev):
|
|||
"""TNC PEAP-SoH"""
|
||||
params = int_eap_server_params()
|
||||
params["tnc"] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP",
|
||||
eap="PEAP", identity="user", password="password",
|
||||
|
@ -45,7 +45,7 @@ def test_tnc_peap_soh_errors(dev, apdev):
|
|||
"""TNC PEAP-SoH local error cases"""
|
||||
params = int_eap_server_params()
|
||||
params["tnc"] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
tests = [ (1, "tncc_build_soh"),
|
||||
(1, "eap_msg_alloc;=eap_peap_phase2_request") ]
|
||||
|
@ -77,7 +77,7 @@ def test_tnc_ttls(dev, apdev):
|
|||
check_eap_capa(dev[0], "MSCHAPV2")
|
||||
params = int_eap_server_params()
|
||||
params["tnc"] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
if not os.path.exists("tnc/libhostap_imc.so"):
|
||||
raise HwsimSkip("No IMC installed")
|
||||
|
@ -96,7 +96,7 @@ def test_tnc_ttls_fragmentation(dev, apdev):
|
|||
params = int_eap_server_params()
|
||||
params["tnc"] = "1"
|
||||
params["fragment_size"] = "150"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
if not os.path.exists("tnc/libhostap_imc.so"):
|
||||
raise HwsimSkip("No IMC installed")
|
||||
|
@ -119,7 +119,7 @@ def test_tnc_ttls_errors(dev, apdev):
|
|||
params = int_eap_server_params()
|
||||
params["tnc"] = "1"
|
||||
params["fragment_size"] = "150"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
tests = [ (1, "eap_ttls_process_phase2_eap;eap_ttls_process_tnc_start",
|
||||
"DOMAIN\mschapv2 user", "auth=MSCHAPV2"),
|
||||
|
@ -177,7 +177,7 @@ def test_tnc_fast(dev, apdev):
|
|||
params["eap_fast_a_id"] = "101112131415161718191a1b1c1d1e00"
|
||||
params["eap_fast_a_id_info"] = "test server2"
|
||||
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
if not os.path.exists("tnc/libhostap_imc.so"):
|
||||
raise HwsimSkip("No IMC installed")
|
||||
|
|
|
@ -9,7 +9,7 @@ import hwsim_utils
|
|||
|
||||
def test_wep_open_auth(dev, apdev):
|
||||
"""WEP Open System authentication"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep-open",
|
||||
"wep_key0": '"hello"' })
|
||||
dev[0].flush_scan_cache()
|
||||
|
@ -27,7 +27,7 @@ def test_wep_open_auth(dev, apdev):
|
|||
|
||||
def test_wep_shared_key_auth(dev, apdev):
|
||||
"""WEP Shared Key authentication"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep-shared-key",
|
||||
"wep_key0": '"hello12345678"',
|
||||
"auth_algs": "2" })
|
||||
|
@ -41,7 +41,7 @@ def test_wep_shared_key_auth(dev, apdev):
|
|||
|
||||
def test_wep_shared_key_auth_not_allowed(dev, apdev):
|
||||
"""WEP Shared Key authentication not allowed"""
|
||||
hostapd.add_ap(apdev[0]['ifname'],
|
||||
hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep-shared-key",
|
||||
"wep_key0": '"hello12345678"',
|
||||
"auth_algs": "1" })
|
||||
|
@ -54,7 +54,7 @@ def test_wep_shared_key_auth_not_allowed(dev, apdev):
|
|||
|
||||
def test_wep_shared_key_auth_multi_key(dev, apdev):
|
||||
"""WEP Shared Key authentication with multiple keys"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep-shared-key",
|
||||
"wep_key0": '"hello12345678"',
|
||||
"wep_key1": '"other12345678"',
|
||||
|
|
|
@ -31,7 +31,7 @@ def test_wext_open(dev, apdev):
|
|||
wpas = get_wext_interface()
|
||||
|
||||
params = { "ssid": "wext-open" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas.connect("wext-open", key_mgmt="NONE")
|
||||
hwsim_utils.test_connectivity(wpas, hapd)
|
||||
|
@ -41,7 +41,7 @@ def test_wext_wpa2_psk(dev, apdev):
|
|||
wpas = get_wext_interface()
|
||||
|
||||
params = hostapd.wpa2_params(ssid="wext-wpa2-psk", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas.connect("wext-wpa2-psk", psk="12345678")
|
||||
hwsim_utils.test_connectivity(wpas, hapd)
|
||||
|
@ -58,7 +58,7 @@ def test_wext_wpa_psk(dev, apdev):
|
|||
wpas = get_wext_interface()
|
||||
|
||||
params = hostapd.wpa_params(ssid="wext-wpa-psk", passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
testfile = "/sys/kernel/debug/ieee80211/%s/netdev:%s/tkip_mic_test" % (hapd.get_driver_status_field("phyname"), apdev[0]['ifname'])
|
||||
if not os.path.exists(testfile):
|
||||
wpas.close_ctrl()
|
||||
|
@ -85,7 +85,7 @@ def test_wext_pmksa_cache(dev, apdev):
|
|||
wpas = get_wext_interface()
|
||||
|
||||
params = hostapd.wpa2_eap_params(ssid="test-pmksa-cache")
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
wpas.connect("test-pmksa-cache", proto="RSN", key_mgmt="WPA-EAP",
|
||||
eap="GPSK", identity="gpsk user",
|
||||
|
@ -97,7 +97,7 @@ def test_wext_pmksa_cache(dev, apdev):
|
|||
if pmksa['opportunistic'] != '0':
|
||||
raise Exception("Unexpected opportunistic PMKSA cache entry")
|
||||
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
bssid2 = apdev[1]['bssid']
|
||||
|
||||
wpas.dump_monitor()
|
||||
|
@ -150,7 +150,7 @@ def test_wext_wep_open_auth(dev, apdev):
|
|||
"""WEP Open System authentication"""
|
||||
wpas = get_wext_interface()
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep-open",
|
||||
"wep_key0": '"hello"' })
|
||||
wpas.connect("wep-open", key_mgmt="NONE", wep_key0='"hello"',
|
||||
|
@ -163,7 +163,7 @@ def test_wext_wep_shared_key_auth(dev, apdev):
|
|||
"""WEP Shared Key authentication"""
|
||||
wpas = get_wext_interface()
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'],
|
||||
hapd = hostapd.add_ap(apdev[0],
|
||||
{ "ssid": "wep-shared-key",
|
||||
"wep_key0": '"hello12345678"',
|
||||
"auth_algs": "2" })
|
||||
|
@ -182,7 +182,7 @@ def test_wext_pmf(dev, apdev):
|
|||
params = hostapd.wpa2_params(ssid="wext-wpa2-psk", passphrase="12345678")
|
||||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256";
|
||||
params["ieee80211w"] = "2";
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
wpas.connect("wext-wpa2-psk", psk="12345678", ieee80211w="1",
|
||||
key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2",
|
||||
|
@ -197,10 +197,10 @@ def test_wext_scan_hidden(dev, apdev):
|
|||
"""WEXT with hidden SSID"""
|
||||
wpas = get_wext_interface()
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-scan",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-scan2",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "test-scan",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
hapd2 = hostapd.add_ap(apdev[1], { "ssid": "test-scan2",
|
||||
"ignore_broadcast_ssid": "1" })
|
||||
|
||||
id1 = wpas.connect("test-scan", key_mgmt="NONE", scan_ssid="1",
|
||||
only_add_network=True)
|
||||
|
@ -234,7 +234,7 @@ def test_wext_rfkill(dev, apdev):
|
|||
|
||||
wpas = get_wext_interface()
|
||||
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
wpas.connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
try:
|
||||
logger.info("rfkill block")
|
||||
|
|
|
@ -23,7 +23,7 @@ def test_wnm_bss_transition_mgmt(dev, apdev):
|
|||
"time_zone": "EST5",
|
||||
"wnm_sleep_mode": "1",
|
||||
"bss_transition": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[0].request("WNM_BSS_QUERY 0")
|
||||
|
@ -35,7 +35,7 @@ def test_wnm_disassoc_imminent(dev, apdev):
|
|||
"time_zone": "EST5",
|
||||
"wnm_sleep_mode": "1",
|
||||
"bss_transition": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -57,7 +57,7 @@ def test_wnm_ess_disassoc_imminent(dev, apdev):
|
|||
"time_zone": "EST5",
|
||||
"wnm_sleep_mode": "1",
|
||||
"bss_transition": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -78,7 +78,7 @@ def test_wnm_ess_disassoc_imminent_pmf(dev, apdev):
|
|||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256";
|
||||
params["ieee80211w"] = "2";
|
||||
params["bss_transition"] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
dev[0].connect("test-wnm-rsn", psk="12345678", ieee80211w="2",
|
||||
|
@ -137,7 +137,7 @@ def test_wnm_sleep_mode_open(dev, apdev):
|
|||
"time_zone": "EST5",
|
||||
"wnm_sleep_mode": "1",
|
||||
"bss_transition": "1" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -162,7 +162,7 @@ def test_wnm_sleep_mode_rsn(dev, apdev):
|
|||
params["time_zone"] = "EST5"
|
||||
params["wnm_sleep_mode"] = "1"
|
||||
params["bss_transition"] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
dev[0].connect("test-wnm-rsn", psk="12345678", scan_freq="2412")
|
||||
|
@ -175,7 +175,7 @@ def test_wnm_sleep_mode_ap_oom(dev, apdev):
|
|||
"""WNM Sleep Mode - AP side OOM"""
|
||||
params = { "ssid": "test-wnm",
|
||||
"wnm_sleep_mode": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5)
|
||||
|
@ -200,7 +200,7 @@ def test_wnm_sleep_mode_rsn_pmf(dev, apdev):
|
|||
params["time_zone"] = "EST5"
|
||||
params["wnm_sleep_mode"] = "1"
|
||||
params["bss_transition"] = "1"
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||
|
||||
dev[0].connect("test-wnm-rsn", psk="12345678", ieee80211w="2",
|
||||
|
@ -287,9 +287,9 @@ def expect_ack(hapd):
|
|||
def test_wnm_bss_tm_req(dev, apdev):
|
||||
"""BSS Transition Management Request"""
|
||||
params = { "ssid": "test-wnm", "bss_transition": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
hapd.set("ext_mgmt_frame_handling", "1")
|
||||
|
||||
|
@ -435,7 +435,7 @@ def test_wnm_bss_keep_alive(dev, apdev):
|
|||
"""WNM keep-alive"""
|
||||
params = { "ssid": "test-wnm",
|
||||
"ap_max_inactivity": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
|
@ -474,7 +474,7 @@ def test_wnm_bss_tm(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "1",
|
||||
"bss_transition": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
id = dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[0].set_network(id, "scan_freq", "")
|
||||
|
@ -485,7 +485,7 @@ def test_wnm_bss_tm(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "36",
|
||||
"bss_transition": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
addr = dev[0].p2p_interface_addr()
|
||||
dev[0].dump_monitor()
|
||||
|
@ -602,7 +602,7 @@ def run_wnm_bss_tm_scan_not_needed(dev, apdev, ht=True, vht=False, hwmode='a',
|
|||
"hw_mode": "g",
|
||||
"channel": "1",
|
||||
"bss_transition": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = { "ssid": "test-wnm",
|
||||
"country_code": "FI",
|
||||
|
@ -617,7 +617,7 @@ def run_wnm_bss_tm_scan_not_needed(dev, apdev, ht=True, vht=False, hwmode='a',
|
|||
params["vht_oper_chwidth"] = "0"
|
||||
params["vht_oper_centr_freq_seg0_idx"] = "0"
|
||||
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq)
|
||||
|
||||
|
@ -666,7 +666,7 @@ def test_wnm_bss_tm_scan_needed(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "1",
|
||||
"bss_transition": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = { "ssid": "test-wnm",
|
||||
"country_code": "FI",
|
||||
|
@ -674,7 +674,7 @@ def test_wnm_bss_tm_scan_needed(dev, apdev):
|
|||
"hw_mode": "a",
|
||||
"channel": "36",
|
||||
"bss_transition": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], 5180)
|
||||
|
||||
|
@ -863,7 +863,7 @@ def test_wnm_action_proto(dev, apdev):
|
|||
"""WNM Action protocol testing"""
|
||||
params = { "ssid": "test-wnm" }
|
||||
params['wnm_sleep_mode'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[0].request("WNM_SLEEP enter")
|
||||
|
@ -1065,7 +1065,7 @@ def test_wnm_action_proto_pmf(dev, apdev):
|
|||
params["wpa_key_mgmt"] = "WPA-PSK-SHA256"
|
||||
params["ieee80211w"] = "2"
|
||||
params['wnm_sleep_mode'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK-SHA256",
|
||||
proto="WPA2", ieee80211w="2", scan_freq="2412")
|
||||
|
@ -1167,7 +1167,7 @@ def test_wnm_action_proto_no_pmf(dev, apdev):
|
|||
ssid = "test-wnm-no-pmf"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
params['wnm_sleep_mode'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK",
|
||||
proto="WPA2", ieee80211w="0", scan_freq="2412")
|
||||
|
@ -1207,7 +1207,7 @@ def test_wnm_bss_tm_req_with_mbo_ie(dev, apdev):
|
|||
"""WNM BSS transition request with MBO IE and reassociation delay attribute"""
|
||||
ssid = "test-wnm-mbo"
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
bssid = apdev[0]['bssid']
|
||||
if "OK" not in dev[0].request("SET mbo_cell_capa 1"):
|
||||
raise Exception("Failed to set STA as cellular data capable")
|
||||
|
@ -1266,9 +1266,9 @@ def test_wnm_bss_transition_mgmt_query(dev, apdev):
|
|||
"""WNM BSS Transition Management query"""
|
||||
params = { "ssid": "test-wnm",
|
||||
"bss_transition": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
params = { "ssid": "another" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], 2412)
|
||||
dev[0].scan_for_bss(apdev[0]['bssid'], 2412)
|
||||
|
@ -1295,13 +1295,13 @@ def test_wnm_bss_tm_security_mismatch(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "1",
|
||||
"bss_transition": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = { "ssid": "test-wnm",
|
||||
"hw_mode": "g",
|
||||
"channel": "11",
|
||||
"bss_transition": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], 2462)
|
||||
|
||||
|
@ -1328,13 +1328,13 @@ def test_wnm_bss_tm_connect_cmd(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "1",
|
||||
"bss_transition": "1" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
|
||||
params = { "ssid": "test-wnm",
|
||||
"hw_mode": "g",
|
||||
"channel": "11",
|
||||
"bss_transition": "1" }
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||
|
||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
|
||||
|
|
|
@ -311,7 +311,7 @@ def test_wpas_ctrl_dup_network(dev, apdev):
|
|||
ssid = "target"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
src = dev[0].connect("another", psk=passphrase, scan_freq="2412",
|
||||
only_add_network=True)
|
||||
|
@ -344,7 +344,7 @@ def test_wpas_ctrl_dup_network_global(dev, apdev):
|
|||
ssid = "target"
|
||||
passphrase = 'qwertyuiop'
|
||||
params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
src = dev[0].connect("another", psk=passphrase, scan_freq="2412",
|
||||
only_add_network=True)
|
||||
|
@ -783,8 +783,8 @@ def test_wpas_ctrl_bssid_filter(dev, apdev):
|
|||
if "OK" not in dev[2].request("SET bssid_filter " + apdev[0]['bssid']):
|
||||
raise Exception("Failed to set bssid_filter")
|
||||
params = { "ssid": "test" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
dev[2].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||
dev[2].scan(freq="2412")
|
||||
bss = dev[2].get_bss(apdev[0]['bssid'])
|
||||
|
@ -817,7 +817,7 @@ def test_wpas_ctrl_bssid_filter(dev, apdev):
|
|||
def test_wpas_ctrl_disallow_aps(dev, apdev):
|
||||
"""wpa_supplicant ctrl_iface disallow_aps"""
|
||||
params = { "ssid": "test" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
if "FAIL" not in dev[0].request("SET disallow_aps bssid "):
|
||||
raise Exception("Unexpected success on invalid disallow_aps")
|
||||
|
@ -835,7 +835,7 @@ def test_wpas_ctrl_disallow_aps(dev, apdev):
|
|||
raise Exception("Unexpected success on invalid disallow_aps")
|
||||
|
||||
dev[0].connect("test", key_mgmt="NONE", scan_freq="2412")
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412")
|
||||
dev[0].dump_monitor()
|
||||
if "OK" not in dev[0].request("SET disallow_aps bssid 00:11:22:33:44:55 bssid 00:22:33:44:55:66"):
|
||||
|
@ -1110,7 +1110,7 @@ def test_wpas_ctrl_log_level(dev):
|
|||
def test_wpas_ctrl_enable_disable_network(dev, apdev):
|
||||
"""wpa_supplicant ctrl_iface ENABLE/DISABLE_NETWORK"""
|
||||
params = { "ssid": "test" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
|
||||
id = dev[0].connect("test", key_mgmt="NONE", scan_freq="2412",
|
||||
only_add_network=True)
|
||||
|
@ -1251,7 +1251,7 @@ def test_wpas_ctrl_roam(dev, apdev):
|
|||
if "FAIL" not in dev[0].request("ROAM 00:11:22:33:44:55"):
|
||||
raise Exception("Unexpected success")
|
||||
params = { "ssid": "test" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
id = dev[0].connect("test", key_mgmt="NONE", scan_freq="2412")
|
||||
if "FAIL" not in dev[0].request("ROAM 00:11:22:33:44:55"):
|
||||
raise Exception("Unexpected success")
|
||||
|
@ -1271,9 +1271,9 @@ def test_wpas_ctrl_ipaddr(dev, apdev):
|
|||
def test_wpas_ctrl_neighbor_rep_req(dev, apdev):
|
||||
"""wpa_supplicant ctrl_iface NEIGHBOR_REP_REQUEST"""
|
||||
params = { "ssid": "test" }
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hostapd.add_ap(apdev[0], params)
|
||||
params = { "ssid": "test2", "radio_measurements": "1" }
|
||||
hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
hostapd.add_ap(apdev[1], params)
|
||||
|
||||
dev[0].connect("test", key_mgmt="NONE", scan_freq="2412")
|
||||
if "FAIL" not in dev[0].request("NEIGHBOR_REP_REQUEST"):
|
||||
|
@ -1485,7 +1485,7 @@ def test_wpas_ctrl_dump(dev, apdev):
|
|||
|
||||
def test_wpas_ctrl_interface_add(dev, apdev):
|
||||
"""wpa_supplicant INTERFACE_ADD/REMOVE with vif creation/removal"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -1500,7 +1500,7 @@ def test_wpas_ctrl_interface_add(dev, apdev):
|
|||
|
||||
def test_wpas_ctrl_interface_add_sta(dev, apdev):
|
||||
"""wpa_supplicant INTERFACE_ADD/REMOVE with STA vif creation/removal"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
ifname = "test-" + dev[0].ifname
|
||||
dev[0].interface_add(ifname, create=True, if_type='sta')
|
||||
wpas = WpaSupplicant(ifname=ifname)
|
||||
|
@ -1550,7 +1550,7 @@ def test_wpas_ctrl_interface_add_many(dev, apdev):
|
|||
dev[0].global_request("INTERFACE_REMOVE " + ifname)
|
||||
|
||||
def _test_wpas_ctrl_interface_add_many(dev, apdev):
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
dev[0].dump_monitor()
|
||||
|
@ -1579,7 +1579,7 @@ def test_wpas_ctrl_interface_add2(dev, apdev):
|
|||
subprocess.call(['iw', 'dev', ifname, 'del'])
|
||||
|
||||
def _test_wpas_ctrl_interface_add2(dev, apdev, ifname):
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0], hapd)
|
||||
|
||||
|
@ -1918,7 +1918,7 @@ def test_wpas_ctrl_sched_scan_plans(dev, apdev):
|
|||
|
||||
def test_wpas_ctrl_signal_monitor(dev, apdev):
|
||||
"""wpa_supplicant SIGNAL_MONITOR command"""
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
|
||||
hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
|
||||
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
|
||||
dev[1].connect("open", key_mgmt="NONE", scan_freq="2412",
|
||||
bgscan="simple:1:-45:2")
|
||||
|
|
|
@ -215,7 +215,7 @@ def test_tspec_not_enabled(dev, apdev):
|
|||
"hw_mode": "g",
|
||||
"channel": "11",
|
||||
"wmm_enabled" : "0" }
|
||||
hapd = hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
dev[0].connect("wmm_no_ac", key_mgmt="NONE", scan_freq="2462")
|
||||
status = dev[0].request("WMM_AC_STATUS")
|
||||
if "Not associated to a WMM AP, WMM AC is Disabled" not in status:
|
||||
|
|
Loading…
Reference in a new issue