aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/accounting.c
diff options
context:
space:
mode:
authorTerry Burton <tez@terryburton.co.uk>2019-07-21 12:05:56 (GMT)
committerJouni Malinen <j@w1.fi>2019-07-30 16:58:09 (GMT)
commitf4111ff3d1f19d219f3818f72cbfab80da10754a (patch)
tree722314a9f298cbe01473ab34c1d86847bd1e0dfd /src/ap/accounting.c
parent74707def8f1b8cdb1755f4f5698bb52b9c8a5442 (diff)
downloadhostap-f4111ff3d1f19d219f3818f72cbfab80da10754a.zip
hostap-f4111ff3d1f19d219f3818f72cbfab80da10754a.tar.gz
hostap-f4111ff3d1f19d219f3818f72cbfab80da10754a.tar.bz2
Extra RADIUS request attributes from SQLite
Add an SQLite table for defining per station MAC address version of radius_auth_req_attr/radius_acct_req_attr information. Create the necessary table and index where this doesn't exist. Select attributes from the table keyed by station MAC address and request type (auth or acct), parse and apply to a RADIUS message. Add radius_req_attr_sqlite hostapd config option for SQLite database file. Open/close RADIUS attribute database for a lifetime of a BSS and invoke functions to add extra attributes during RADIUS auth and accounting request generation. Signed-off-by: Terry Burton <tez@terryburton.co.uk>
Diffstat (limited to 'src/ap/accounting.c')
-rw-r--r--src/ap/accounting.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ap/accounting.c b/src/ap/accounting.c
index 0aacc3c..9fc1886 100644
--- a/src/ap/accounting.c
+++ b/src/ap/accounting.c
@@ -97,6 +97,9 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
msg) < 0)
goto fail;
+ if (sta && add_sqlite_radius_attr(hapd, sta, msg, 1) < 0)
+ goto fail;
+
if (sta) {
for (i = 0; ; i++) {
val = ieee802_1x_get_radius_class(sta->eapol_sm, &len,