From: Jouni Malinen Date: Tue, 12 Mar 2019 15:18:38 +0000 (+0200) Subject: tests: Disable fragm/rts_threshold after testing it X-Git-Tag: hostap_2_8~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53b4f0fe6abc985971b101453f45fe3e4a794fd2;p=thirdparty%2Fhostap.git tests: Disable fragm/rts_threshold after testing it 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 --- diff --git a/tests/hwsim/test_ap_params.py b/tests/hwsim/test_ap_params.py index 16da15ae4..72e05b936 100644 --- a/tests/hwsim/test_ap_params.py +++ b/tests/hwsim/test_ap_params.py @@ -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"""