From: Jouni Malinen Date: Sun, 1 Mar 2015 15:50:17 +0000 (+0200) Subject: tests: RADIUS client address specified X-Git-Tag: hostap_2_4~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c5658c66145ff16a3b95506be40049f8729fe22;p=thirdparty%2Fhostap.git tests: RADIUS client address specified Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_radius.py b/tests/hwsim/test_radius.py index ae46828f4..63b15c71e 100644 --- a/tests/hwsim/test_radius.py +++ b/tests/hwsim/test_radius.py @@ -920,3 +920,24 @@ def test_radius_psk(dev, apdev): finally: t_events['stop'].set() t.join() + +def test_radius_auth_force_client_addr(dev, apdev): + """RADIUS client address specified""" + params = hostapd.wpa2_eap_params(ssid="radius-auth") + params['radius_client_addr'] = "127.0.0.1" + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + connect(dev[0], "radius-auth") + +def test_radius_auth_force_invalid_client_addr(dev, apdev): + """RADIUS client address specified and invalid address""" + params = hostapd.wpa2_eap_params(ssid="radius-auth") + #params['radius_client_addr'] = "10.11.12.14" + params['radius_client_addr'] = "1::2" + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + connect(dev[0], "radius-auth", wait_connect=False) + ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"]) + if ev is None: + raise Exception("Timeout on EAP start") + ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1) + if ev is not None: + raise Exception("Unexpected connection")