From: Jouni Malinen Date: Sat, 28 Feb 2015 12:00:58 +0000 (+0200) Subject: tests: RADIUS server connect() failing during startup X-Git-Tag: hostap_2_4~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abeea374a4567a6b6441dd082f319815b2e4c061;p=thirdparty%2Fhostap.git tests: RADIUS server connect() failing during startup Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_radius.py b/tests/hwsim/test_radius.py index 827f43d85..781463e5f 100644 --- a/tests/hwsim/test_radius.py +++ b/tests/hwsim/test_radius.py @@ -64,6 +64,25 @@ def test_radius_auth_unreachable2(dev, apdev): if int(mib["radiusAuthClientAccessRetransmissions"]) < 1: raise Exception("Missing RADIUS Authentication retransmission") +def test_radius_auth_unreachable3(dev, apdev): + """RADIUS Authentication server initially unreachable, but then available""" + subprocess.call(['ip', 'ro', 'replace', 'blackhole', '192.168.213.18']) + params = hostapd.wpa2_eap_params(ssid="radius-auth") + params['auth_server_addr'] = "192.168.213.18" + hostapd.add_ap(apdev[0]['ifname'], params) + hapd = hostapd.Hostapd(apdev[0]['ifname']) + 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") + subprocess.call(['ip', 'ro', 'del', 'blackhole', '192.168.213.18']) + time.sleep(0.1) + dev[0].request("DISCONNECT") + hapd.set('auth_server_addr_replace', '127.0.0.1') + dev[0].request("RECONNECT") + + dev[0].wait_connected() + def test_radius_acct_unreachable(dev, apdev): """RADIUS Accounting server unreachable""" params = hostapd.wpa2_eap_params(ssid="radius-acct")