]> git.ipfire.org Git - thirdparty/hostap.git/commit
authsrv: Log RADIUS accounting data
authorDávid Benko <davidbenko@davidbenko.dev>
Sun, 23 Feb 2025 22:42:39 +0000 (23:42 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 2 Mar 2025 17:30:13 +0000 (19:30 +0200)
commited423e44f2703a56e29f75b0d3f6dee6f40a00e9
treedd9627585053eef9c30c8add94a3c2f1f2e19983
parent96dd8a03b07004e3a7aaefa0b2ed5715d4f296c1
authsrv: Log RADIUS accounting data

Add option to log all received RADIUS accounting information. This is
a follow-up patch for a new `acct_req_cb` in RADIUS server implementation.

The callback logs all accounting status codes. Invalid requests are
discarded as of RFC 2866. Logged data include:
- NAS identification (NAS-Identifier, NAS-IP-Address or NAS-IPv6-Address)
- session ID (Acct-Session-Id)
- username
- device identification (Calling-Station-Id)
- session time
- input/output packet and byte counters (including gigawords as of
  RFC 2869)

This may be a base for possible extensions of RADIUS accounting in
hostapd. However, since there are far more robust alternatives (namely
FreeRADIUS) and hostapd is primarily used for restricted and/or simple
deployments, I don't consider them necessary. Other use cases can be
covered by a custom reimplementation of binary and a different
acct_req_cb callback.

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h
src/ap/authsrv.c