]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Verify RADIUS functionality over IPv6
authorJouni Malinen <j@w1.fi>
Fri, 28 Feb 2014 22:14:49 +0000 (00:14 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 08:35:33 +0000 (10:35 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/auth_serv/radius_clients_ipv6.conf [new file with mode: 0644]
tests/hwsim/test_radius.py

diff --git a/tests/hwsim/auth_serv/radius_clients_ipv6.conf b/tests/hwsim/auth_serv/radius_clients_ipv6.conf
new file mode 100644 (file)
index 0000000..8723efc
--- /dev/null
@@ -0,0 +1 @@
+::1    radius
index ea7e476c9363c3ad71e61b09b2e70ff3a2e49142..cb7fc03e896ef771192e1888cc0492a72d560ecd 100644 (file)
@@ -395,3 +395,29 @@ def test_radius_das_coa(dev, apdev):
         raise Exception("Missing Error-Cause")
     if reply['Error-Cause'][0] != 405:
         raise Exception("Unexpected Error-Cause: {}".format(reply['Error-Cause']))
+
+def test_radius_ipv6(dev, apdev):
+    """RADIUS connection over IPv6"""
+    params = {}
+    params['ssid'] = 'as'
+    params['beacon_int'] = '2000'
+    params['radius_server_clients'] = 'auth_serv/radius_clients_ipv6.conf'
+    params['radius_server_ipv6'] = '1'
+    params['radius_server_auth_port'] = '18129'
+    params['radius_server_acct_port'] = '18139'
+    params['eap_server'] = '1'
+    params['eap_user_file'] = 'auth_serv/eap_user.conf'
+    params['ca_cert'] = 'auth_serv/ca.pem'
+    params['server_cert'] = 'auth_serv/server.pem'
+    params['private_key'] = 'auth_serv/server.key'
+    hostapd.add_ap(apdev[1]['ifname'], params)
+
+    params = hostapd.wpa2_eap_params(ssid="radius-ipv6")
+    params['auth_server_addr'] = "::0"
+    params['auth_server_port'] = "18129"
+    params['acct_server_addr'] = "::0"
+    params['acct_server_port'] = "18139"
+    params['acct_server_shared_secret'] = "radius"
+    params['own_ip_addr'] = "::0"
+    hostapd.add_ap(apdev[0]['ifname'], params)
+    connect(dev[0], "radius-ipv6")