From: Jouni Malinen Date: Sat, 31 May 2014 21:02:15 +0000 (+0300) Subject: tests: RADIUS interim accounting with unreachable server X-Git-Tag: hostap_2_2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b5f1095ce4d26f191419e0fbada095d1442d735;p=thirdparty%2Fhostap.git tests: RADIUS interim accounting with unreachable server This adds coverage for radius_client_list_del() loop that deletes pending messages related to the specific STA. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_radius.py b/tests/hwsim/test_radius.py index 511bd1bf6..cf4734bb1 100644 --- a/tests/hwsim/test_radius.py +++ b/tests/hwsim/test_radius.py @@ -164,6 +164,24 @@ def test_radius_acct_interim(dev, apdev): if req_e < req_s + 3: raise Exception("Unexpected RADIUS server acct MIB value") +def test_radius_acct_interim_unreachable(dev, apdev): + """RADIUS Accounting interim update with unreachable server""" + params = hostapd.wpa2_eap_params(ssid="radius-acct") + params['acct_server_addr'] = "127.0.0.1" + params['acct_server_port'] = "18139" + params['acct_server_shared_secret'] = "radius" + params['radius_acct_interim_interval'] = "1" + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + start = hapd.get_mib() + connect(dev[0], "radius-acct") + logger.info("Waiting for interium accounting updates") + time.sleep(3.1) + end = hapd.get_mib() + req_s = int(start['radiusAccClientTimeouts']) + req_e = int(end['radiusAccClientTimeouts']) + if req_e < req_s + 2: + raise Exception("Unexpected RADIUS server acct MIB value") + def test_radius_das_disconnect(dev, apdev): """RADIUS Dynamic Authorization Extensions - Disconnect""" try: