]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Authentication server and invalid clients file
authorJouni Malinen <jouni.malinen@oss.qualcomm.com>
Fri, 17 Oct 2025 13:12:55 +0000 (16:12 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 17 Oct 2025 13:12:55 +0000 (16:12 +0300)
Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
tests/hwsim/test_authsrv.py

index e0665bcb26b2720695d288ead1d222da0355e11e..268bb0762d71e3b799d871ca05f3784efb596537 100644 (file)
@@ -260,3 +260,14 @@ def test_authsrv_unknown_client(dev, apdev):
     if ev is None:
         raise Exception("EAP not started")
     dev[0].request("REMOVE_NETWORK all")
+
+def test_authsrv_invalid_clients_file(dev, apdev, params):
+    """Authentication server and invalid clients file"""
+    conf = params['prefix'] + '.authsrv.conf'
+    with open(conf, 'w') as f:
+        f.write("1.2.3.4       foo\nfoo")
+    p = authsrv_params()
+    p["radius_server_clients"] = conf
+    hapd = hostapd.add_ap(apdev[0], p, no_enable=True)
+    if "FAIL" not in hapd.request("ENABLE"):
+        raise Exception("ENABLE did not fail")