From 8b5f1095ce4d26f191419e0fbada095d1442d735 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 1 Jun 2014 00:02:15 +0300 Subject: [PATCH] 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 --- tests/hwsim/test_radius.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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: