]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Disable fragm/rts_threshold after testing it
authorJouni Malinen <jouni@codeaurora.org>
Tue, 12 Mar 2019 15:18:38 +0000 (17:18 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 12 Mar 2019 15:18:38 +0000 (17:18 +0200)
The configurated fragmentation/RTS threshold value survives AP mode
interface restarts, so these values need to be explicitly cleared back
to default (disabled). This fixes an issue where some test cases could
not work correctly if fragmentation on the interface was enabled. For
example, this combination used to fail:
ap_fragmentation_open ap_hs20_fetch_osu

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_params.py

index 16da15ae45e123ae421365878942b2d5e3244325..72e05b9369f640e6aa6d72812a0a2dc010b9ea10 100644 (file)
@@ -28,6 +28,11 @@ def test_ap_fragmentation_rts_set_high(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], params)
     dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
     hwsim_utils.test_connectivity(dev[0], hapd)
+    dev[0].request("DISCONNECT")
+    hapd.disable()
+    hapd.set('fragm_threshold', '-1')
+    hapd.set('rts_threshold', '-1')
+    hapd.enable()
 
 @remote_compatible
 def test_ap_fragmentation_open(dev, apdev):
@@ -39,6 +44,10 @@ def test_ap_fragmentation_open(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], params)
     dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
     hwsim_utils.test_connectivity(dev[0], hapd)
+    dev[0].request("DISCONNECT")
+    hapd.disable()
+    hapd.set('fragm_threshold', '-1')
+    hapd.enable()
 
 @remote_compatible
 def test_ap_fragmentation_wpa2(dev, apdev):
@@ -50,6 +59,10 @@ def test_ap_fragmentation_wpa2(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], params)
     dev[0].connect(ssid, psk=passphrase, scan_freq="2412")
     hwsim_utils.test_connectivity(dev[0], hapd)
+    dev[0].request("DISCONNECT")
+    hapd.disable()
+    hapd.set('fragm_threshold', '-1')
+    hapd.enable()
 
 def test_ap_vendor_elements(dev, apdev):
     """WPA2-PSK AP with vendor elements added"""