]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: RADIUS MAC ACL and accounting enabled
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 29 Jan 2015 13:48:23 +0000 (15:48 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 29 Jan 2015 13:55:48 +0000 (15:55 +0200)
This ends up using the special User-Name = STA MAC address case for
Accounting-Request. In addition, add Chargeable-User-Identity for one of
the STAs.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/auth_serv/eap_user.conf
tests/hwsim/test_radius.py

index 7d52b6e3a67c21bf9c56b94b51ff8175f5b573cd..102d0f36f0f93f2162bf3831b74ac9a613229e68 100644 (file)
@@ -47,6 +47,9 @@ radius_accept_attr=27:d:3
 
 "020000000000" MACACL  "020000000000"
 
+"020000000100" MACACL  "020000000100"
+radius_accept_attr=89:s:macacl-cui-test
+
 "0232010000000000@ttls"        TTLS,AKA
 "0232010000000000@peap"        PEAP,AKA
 "0232010000000000@fast"        FAST,AKA
index b3a7d5cfe1ee275b3817dc7aa035223da84bbf1a..4b64ca506e70b36dacc6e3ba56b57d82502f05a0 100644 (file)
@@ -610,6 +610,21 @@ def test_radius_macacl(dev, apdev):
     hostapd.add_ap(apdev[0]['ifname'], params)
     dev[0].connect("radius", key_mgmt="NONE", scan_freq="2412")
 
+def test_radius_macacl_acct(dev, apdev):
+    """RADIUS MAC ACL and accounting enabled"""
+    params = hostapd.radius_params()
+    params["ssid"] = "radius"
+    params["macaddr_acl"] = "2"
+    params['acct_server_addr'] = "127.0.0.1"
+    params['acct_server_port'] = "1813"
+    params['acct_server_shared_secret'] = "radius"
+    hostapd.add_ap(apdev[0]['ifname'], params)
+    dev[0].connect("radius", key_mgmt="NONE", scan_freq="2412")
+    dev[1].connect("radius", key_mgmt="NONE", scan_freq="2412")
+    dev[1].request("DISCONNECT")
+    dev[1].wait_disconnected()
+    dev[1].request("RECONNECT")
+
 def test_radius_failover(dev, apdev):
     """RADIUS Authentication and Accounting server failover"""
     subprocess.call(['sudo', 'ip', 'ro', 'replace', '192.168.213.17', 'dev',