mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
tests: Verify RADIUS accounting functionality
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
1cfb58d400
commit
4287bb76bf
@ -1,5 +1,6 @@
|
|||||||
driver=none
|
driver=none
|
||||||
radius_server_clients=auth_serv/radius_clients.conf
|
radius_server_clients=auth_serv/radius_clients.conf
|
||||||
|
radius_server_acct_port=1813
|
||||||
eap_server=1
|
eap_server=1
|
||||||
eap_user_file=auth_serv/eap_user.conf
|
eap_user_file=auth_serv/eap_user.conf
|
||||||
|
|
||||||
|
@ -56,3 +56,26 @@ def test_radius_acct_unreachable(dev, apdev):
|
|||||||
raise Exception("Missing RADIUS Accounting retransmissions")
|
raise Exception("Missing RADIUS Accounting retransmissions")
|
||||||
if int(mib["radiusAccClientPendingRequests"]) < 2:
|
if int(mib["radiusAccClientPendingRequests"]) < 2:
|
||||||
raise Exception("Missing pending RADIUS Accounting requests")
|
raise Exception("Missing pending RADIUS Accounting requests")
|
||||||
|
|
||||||
|
def test_radius_acct(dev, apdev):
|
||||||
|
"""RADIUS Accounting"""
|
||||||
|
params = hostapd.wpa2_eap_params(ssid="radius-acct")
|
||||||
|
params['acct_server_addr'] = "127.0.0.1"
|
||||||
|
params['acct_server_port'] = "1813"
|
||||||
|
params['acct_server_shared_secret'] = "radius"
|
||||||
|
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||||
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||||
|
connect(dev[0], "radius-acct")
|
||||||
|
logger.info("Checking for RADIUS counters")
|
||||||
|
count = 0
|
||||||
|
while True:
|
||||||
|
mib = hapd.get_mib()
|
||||||
|
if int(mib['radiusAccClientResponses']) >= 2:
|
||||||
|
break
|
||||||
|
time.sleep(0.1)
|
||||||
|
count += 1
|
||||||
|
if count > 10:
|
||||||
|
raise Exception("Did not receive Accounting-Response packets")
|
||||||
|
|
||||||
|
if int(mib['radiusAccClientRetransmissions']) > 0:
|
||||||
|
raise Exception("Unexpected Accounting-Request retransmission")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user