]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: RADIUS MAC ACL and OOM
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 8 Feb 2017 15:28:49 +0000 (17:28 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 8 Feb 2017 21:48:19 +0000 (23:48 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_radius.py

index 2cf4d1487a05e8a18cc911700ca4e340ada71cd7..6168885a6568495c498ad5770a48b48bb6bfbf20 100644 (file)
@@ -884,6 +884,26 @@ def test_radius_macacl_acct(dev, apdev):
     dev[1].wait_disconnected()
     dev[1].request("RECONNECT")
 
+def test_radius_macacl_oom(dev, apdev):
+    """RADIUS MAC ACL and OOM"""
+    params = hostapd.radius_params()
+    params["ssid"] = "radius"
+    params["macaddr_acl"] = "2"
+    hapd = hostapd.add_ap(apdev[0], params)
+    bssid = hapd.own_addr()
+
+    dev[0].scan_for_bss(bssid, freq="2412")
+    with alloc_fail(hapd, 1, "hostapd_allowed_address"):
+        dev[0].connect("radius", key_mgmt="NONE", scan_freq="2412")
+
+    dev[1].scan_for_bss(bssid, freq="2412")
+    with alloc_fail(hapd, 2, "hostapd_allowed_address"):
+        dev[1].connect("radius", key_mgmt="NONE", scan_freq="2412")
+
+    dev[2].scan_for_bss(bssid, freq="2412")
+    with alloc_fail(hapd, 2, "=hostapd_allowed_address"):
+        dev[2].connect("radius", key_mgmt="NONE", scan_freq="2412")
+
 def test_radius_failover(dev, apdev):
     """RADIUS Authentication and Accounting server failover"""
     subprocess.call(['ip', 'ro', 'replace', '192.168.213.17', 'dev', 'lo'])