scan_freq="2412")
if dev[0].get_status_field('sae_group') != '19':
raise Exception("Expected SAE group not used")
+
+def test_sae_anti_clogging(dev, apdev):
+ """SAE anti clogging"""
+ 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)
+
+ dev[0].request("SET sae_groups ")
+ dev[1].request("SET sae_groups ")
+ id = {}
+ for i in range(0, 2):
+ dev[i].scan(freq="2412")
+ id[i] = dev[i].connect("test-sae", psk="12345678", key_mgmt="SAE",
+ scan_freq="2412", only_add_network=True)
+ for i in range(0, 2):
+ dev[i].select_network(id[i])
+ for i in range(0, 2):
+ ev = dev[i].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)
+ if ev is None:
+ raise Exception("Association with the AP timed out")
password=None, phase1=None, phase2=None, ca_cert=None,
domain_suffix_match=None, password_hex=None,
client_cert=None, private_key=None, peerkey=False,
- wait_connect=True):
+ wait_connect=True, only_add_network=False):
logger.info("Connect STA " + self.ifname + " to AP")
id = self.add_network()
self.set_network_quoted(id, "ssid", ssid)
domain_suffix_match)
if peerkey:
self.set_network(id, "peerkey", "1")
+ if only_add_network:
+ return id
if wait_connect:
self.connect_network(id)
else: