From 9dd5373122e3330f81f62b6a7b6967e2f6104bf6 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 4 Apr 2020 21:49:31 +0300 Subject: [PATCH] tests: FT+PMF roaming with skip_prune Verify hostapd behavior during FT protocol processing when a STA entry is still present in the AP and that association has PMF negotiated. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_ft.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index 770b26131..a7a71711a 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -3312,8 +3312,17 @@ def test_ap_ft_skip_prune_assoc2(dev, apdev): """WPA2-PSK-FT AP with skip_prune_assoc (disable full_ap_client_state)""" run_ap_ft_skip_prune_assoc(dev, apdev, True, False, test_connectivity=False) +def test_ap_ft_skip_prune_assoc_pmf(dev, apdev): + """WPA2-PSK-FT/PMF AP with skip_prune_assoc""" + run_ap_ft_skip_prune_assoc(dev, apdev, True, True, pmf=True) + +def test_ap_ft_skip_prune_assoc_pmf_over_ds(dev, apdev): + """WPA2-PSK-FT/PMF AP with skip_prune_assoc (over DS)""" + run_ap_ft_skip_prune_assoc(dev, apdev, True, True, pmf=True, over_ds=True) + def run_ap_ft_skip_prune_assoc(dev, apdev, skip_prune_assoc, - full_ap_client_state, test_connectivity=True): + full_ap_client_state, test_connectivity=True, + pmf=False, over_ds=False): ssid = "test-ft" passphrase = "12345678" @@ -3322,16 +3331,21 @@ def run_ap_ft_skip_prune_assoc(dev, apdev, skip_prune_assoc, params['skip_prune_assoc'] = '1' if not full_ap_client_state: params['driver_params'] = "full_ap_client_state=0" + if pmf: + params["ieee80211w"] = "2" hapd0 = hostapd.add_ap(apdev[0], params) params = ft_params2(ssid=ssid, passphrase=passphrase) if skip_prune_assoc: params['skip_prune_assoc'] = '1' if not full_ap_client_state: params['driver_params'] = "full_ap_client_state=0" + if pmf: + params["ieee80211w"] = "2" hapd1 = hostapd.add_ap(apdev[1], params) run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, - test_connectivity=test_connectivity) + ieee80211w="2" if pmf else "0", + over_ds=over_ds, test_connectivity=test_connectivity) def test_ap_ft_sae_skip_prune_assoc(dev, apdev): """WPA2-PSK-FT-SAE AP with skip_prune_assoc"""