blob: c60b3a6c3e8935243678e0b30bb00673a41f2e83 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * hostapd / RADIUS Accounting
Dmitry Shmidtd80a4012015-11-05 16:35:40 -08003 * Copyright (c) 2002-2009, 2012-2015, Jouni Malinen <j@w1.fi>
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07004 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#include "utils/includes.h"
10
11#include "utils/common.h"
12#include "utils/eloop.h"
Dmitry Shmidtfb45fd52015-01-05 13:08:17 -080013#include "eapol_auth/eapol_auth_sm.h"
14#include "eapol_auth/eapol_auth_sm_i.h"
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070015#include "radius/radius.h"
16#include "radius/radius_client.h"
17#include "hostapd.h"
18#include "ieee802_1x.h"
19#include "ap_config.h"
20#include "sta_info.h"
21#include "ap_drv_ops.h"
22#include "accounting.h"
23
24
25/* Default interval in seconds for polling TX/RX octets from the driver if
26 * STA is not using interim accounting. This detects wrap arounds for
27 * input/output octets and updates Acct-{Input,Output}-Gigawords. */
28#define ACCT_DEFAULT_UPDATE_INTERVAL 300
29
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070030static void accounting_sta_interim(struct hostapd_data *hapd,
31 struct sta_info *sta);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070032
33
34static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
35 struct sta_info *sta,
36 int status_type)
37{
38 struct radius_msg *msg;
39 char buf[128];
40 u8 *val;
41 size_t len;
42 int i;
Dmitry Shmidt04949592012-07-19 12:16:46 -070043 struct wpabuf *b;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070044
45 msg = radius_msg_new(RADIUS_CODE_ACCOUNTING_REQUEST,
46 radius_client_get_id(hapd->radius));
47 if (msg == NULL) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -080048 wpa_printf(MSG_INFO, "Could not create new RADIUS packet");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070049 return NULL;
50 }
51
52 if (sta) {
53 radius_msg_make_authenticator(msg, (u8 *) sta, sizeof(*sta));
54
Dmitry Shmidtfb45fd52015-01-05 13:08:17 -080055 if ((hapd->conf->wpa & 2) &&
56 !hapd->conf->disable_pmksa_caching &&
57 sta->eapol_sm && sta->eapol_sm->acct_multi_session_id_hi) {
58 os_snprintf(buf, sizeof(buf), "%08X+%08X",
59 sta->eapol_sm->acct_multi_session_id_hi,
60 sta->eapol_sm->acct_multi_session_id_lo);
61 if (!radius_msg_add_attr(
62 msg, RADIUS_ATTR_ACCT_MULTI_SESSION_ID,
63 (u8 *) buf, os_strlen(buf))) {
64 wpa_printf(MSG_INFO,
65 "Could not add Acct-Multi-Session-Id");
66 goto fail;
67 }
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070068 }
69 } else {
70 radius_msg_make_authenticator(msg, (u8 *) hapd, sizeof(*hapd));
71 }
72
73 if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_STATUS_TYPE,
74 status_type)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -080075 wpa_printf(MSG_INFO, "Could not add Acct-Status-Type");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070076 goto fail;
77 }
78
Dmitry Shmidt04949592012-07-19 12:16:46 -070079 if (!hostapd_config_get_radius_attr(hapd->conf->radius_acct_req_attr,
80 RADIUS_ATTR_ACCT_AUTHENTIC) &&
81 !radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_AUTHENTIC,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070082 hapd->conf->ieee802_1x ?
83 RADIUS_ACCT_AUTHENTIC_RADIUS :
84 RADIUS_ACCT_AUTHENTIC_LOCAL)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -080085 wpa_printf(MSG_INFO, "Could not add Acct-Authentic");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070086 goto fail;
87 }
88
89 if (sta) {
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070090 /* Use 802.1X identity if available */
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070091 val = ieee802_1x_get_identity(sta->eapol_sm, &len);
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070092
93 /* Use RADIUS ACL identity if 802.1X provides no identity */
94 if (!val && sta->identity) {
95 val = (u8 *) sta->identity;
96 len = os_strlen(sta->identity);
97 }
98
99 /* Use STA MAC if neither 802.1X nor RADIUS ACL provided
100 * identity */
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700101 if (!val) {
102 os_snprintf(buf, sizeof(buf), RADIUS_ADDR_FORMAT,
103 MAC2STR(sta->addr));
104 val = (u8 *) buf;
105 len = os_strlen(buf);
106 }
107
108 if (!radius_msg_add_attr(msg, RADIUS_ATTR_USER_NAME, val,
109 len)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800110 wpa_printf(MSG_INFO, "Could not add User-Name");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700111 goto fail;
112 }
113 }
114
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700115 if (add_common_radius_attr(hapd, hapd->conf->radius_acct_req_attr, sta,
116 msg) < 0)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700117 goto fail;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700118
119 if (sta) {
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700120 for (i = 0; ; i++) {
121 val = ieee802_1x_get_radius_class(sta->eapol_sm, &len,
122 i);
123 if (val == NULL)
124 break;
125
126 if (!radius_msg_add_attr(msg, RADIUS_ATTR_CLASS,
127 val, len)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800128 wpa_printf(MSG_INFO, "Could not add Class");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700129 goto fail;
130 }
131 }
Dmitry Shmidt04949592012-07-19 12:16:46 -0700132
133 b = ieee802_1x_get_radius_cui(sta->eapol_sm);
134 if (b &&
135 !radius_msg_add_attr(msg,
136 RADIUS_ATTR_CHARGEABLE_USER_IDENTITY,
137 wpabuf_head(b), wpabuf_len(b))) {
138 wpa_printf(MSG_ERROR, "Could not add CUI");
139 goto fail;
140 }
Dmitry Shmidt04949592012-07-19 12:16:46 -0700141
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700142 if (!b && sta->radius_cui &&
143 !radius_msg_add_attr(msg,
144 RADIUS_ATTR_CHARGEABLE_USER_IDENTITY,
145 (u8 *) sta->radius_cui,
146 os_strlen(sta->radius_cui))) {
147 wpa_printf(MSG_ERROR, "Could not add CUI from ACL");
Dmitry Shmidt04949592012-07-19 12:16:46 -0700148 goto fail;
149 }
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800150
151 if (sta->ipaddr &&
152 !radius_msg_add_attr_int32(msg,
153 RADIUS_ATTR_FRAMED_IP_ADDRESS,
154 be_to_host32(sta->ipaddr))) {
155 wpa_printf(MSG_ERROR,
156 "Could not add Framed-IP-Address");
157 goto fail;
158 }
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700159 }
160
161 return msg;
162
163 fail:
164 radius_msg_free(msg);
165 return NULL;
166}
167
168
169static int accounting_sta_update_stats(struct hostapd_data *hapd,
170 struct sta_info *sta,
171 struct hostap_sta_driver_data *data)
172{
173 if (hostapd_drv_read_sta_data(hapd, data, sta->addr))
174 return -1;
175
176 if (sta->last_rx_bytes > data->rx_bytes)
177 sta->acct_input_gigawords++;
178 if (sta->last_tx_bytes > data->tx_bytes)
179 sta->acct_output_gigawords++;
180 sta->last_rx_bytes = data->rx_bytes;
181 sta->last_tx_bytes = data->tx_bytes;
182
183 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS,
184 HOSTAPD_LEVEL_DEBUG, "updated TX/RX stats: "
185 "Acct-Input-Octets=%lu Acct-Input-Gigawords=%u "
186 "Acct-Output-Octets=%lu Acct-Output-Gigawords=%u",
187 sta->last_rx_bytes, sta->acct_input_gigawords,
188 sta->last_tx_bytes, sta->acct_output_gigawords);
189
190 return 0;
191}
192
193
194static void accounting_interim_update(void *eloop_ctx, void *timeout_ctx)
195{
196 struct hostapd_data *hapd = eloop_ctx;
197 struct sta_info *sta = timeout_ctx;
198 int interval;
199
200 if (sta->acct_interim_interval) {
201 accounting_sta_interim(hapd, sta);
202 interval = sta->acct_interim_interval;
203 } else {
204 struct hostap_sta_driver_data data;
205 accounting_sta_update_stats(hapd, sta, &data);
206 interval = ACCT_DEFAULT_UPDATE_INTERVAL;
207 }
208
209 eloop_register_timeout(interval, 0, accounting_interim_update,
210 hapd, sta);
211}
212
213
214/**
215 * accounting_sta_start - Start STA accounting
216 * @hapd: hostapd BSS data
217 * @sta: The station
218 */
219void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta)
220{
221 struct radius_msg *msg;
222 int interval;
223
224 if (sta->acct_session_started)
225 return;
226
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700227 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS,
228 HOSTAPD_LEVEL_INFO,
229 "starting accounting session %08X-%08X",
230 sta->acct_session_id_hi, sta->acct_session_id_lo);
231
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -0800232 os_get_reltime(&sta->acct_session_start);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700233 sta->last_rx_bytes = sta->last_tx_bytes = 0;
234 sta->acct_input_gigawords = sta->acct_output_gigawords = 0;
235 hostapd_drv_sta_clear_stats(hapd, sta->addr);
236
237 if (!hapd->conf->radius->acct_server)
238 return;
239
240 if (sta->acct_interim_interval)
241 interval = sta->acct_interim_interval;
242 else
243 interval = ACCT_DEFAULT_UPDATE_INTERVAL;
244 eloop_register_timeout(interval, 0, accounting_interim_update,
245 hapd, sta);
246
247 msg = accounting_msg(hapd, sta, RADIUS_ACCT_STATUS_TYPE_START);
Dmitry Shmidt04949592012-07-19 12:16:46 -0700248 if (msg &&
249 radius_client_send(hapd->radius, msg, RADIUS_ACCT, sta->addr) < 0)
250 radius_msg_free(msg);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700251
252 sta->acct_session_started = 1;
253}
254
255
256static void accounting_sta_report(struct hostapd_data *hapd,
257 struct sta_info *sta, int stop)
258{
259 struct radius_msg *msg;
260 int cause = sta->acct_terminate_cause;
261 struct hostap_sta_driver_data data;
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -0800262 struct os_reltime now_r, diff;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700263 struct os_time now;
264 u32 gigawords;
265
266 if (!hapd->conf->radius->acct_server)
267 return;
268
269 msg = accounting_msg(hapd, sta,
270 stop ? RADIUS_ACCT_STATUS_TYPE_STOP :
271 RADIUS_ACCT_STATUS_TYPE_INTERIM_UPDATE);
272 if (!msg) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800273 wpa_printf(MSG_INFO, "Could not create RADIUS Accounting message");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700274 return;
275 }
276
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -0800277 os_get_reltime(&now_r);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700278 os_get_time(&now);
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -0800279 os_reltime_sub(&now_r, &sta->acct_session_start, &diff);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700280 if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_SESSION_TIME,
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -0800281 diff.sec)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800282 wpa_printf(MSG_INFO, "Could not add Acct-Session-Time");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700283 goto fail;
284 }
285
286 if (accounting_sta_update_stats(hapd, sta, &data) == 0) {
287 if (!radius_msg_add_attr_int32(msg,
288 RADIUS_ATTR_ACCT_INPUT_PACKETS,
289 data.rx_packets)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800290 wpa_printf(MSG_INFO, "Could not add Acct-Input-Packets");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700291 goto fail;
292 }
293 if (!radius_msg_add_attr_int32(msg,
294 RADIUS_ATTR_ACCT_OUTPUT_PACKETS,
295 data.tx_packets)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800296 wpa_printf(MSG_INFO, "Could not add Acct-Output-Packets");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700297 goto fail;
298 }
299 if (!radius_msg_add_attr_int32(msg,
300 RADIUS_ATTR_ACCT_INPUT_OCTETS,
301 data.rx_bytes)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800302 wpa_printf(MSG_INFO, "Could not add Acct-Input-Octets");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700303 goto fail;
304 }
305 gigawords = sta->acct_input_gigawords;
306#if __WORDSIZE == 64
307 gigawords += data.rx_bytes >> 32;
308#endif
309 if (gigawords &&
310 !radius_msg_add_attr_int32(
311 msg, RADIUS_ATTR_ACCT_INPUT_GIGAWORDS,
312 gigawords)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800313 wpa_printf(MSG_INFO, "Could not add Acct-Input-Gigawords");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700314 goto fail;
315 }
316 if (!radius_msg_add_attr_int32(msg,
317 RADIUS_ATTR_ACCT_OUTPUT_OCTETS,
318 data.tx_bytes)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800319 wpa_printf(MSG_INFO, "Could not add Acct-Output-Octets");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700320 goto fail;
321 }
322 gigawords = sta->acct_output_gigawords;
323#if __WORDSIZE == 64
324 gigawords += data.tx_bytes >> 32;
325#endif
326 if (gigawords &&
327 !radius_msg_add_attr_int32(
328 msg, RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS,
329 gigawords)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800330 wpa_printf(MSG_INFO, "Could not add Acct-Output-Gigawords");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700331 goto fail;
332 }
333 }
334
335 if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_EVENT_TIMESTAMP,
336 now.sec)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800337 wpa_printf(MSG_INFO, "Could not add Event-Timestamp");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700338 goto fail;
339 }
340
341 if (eloop_terminated())
342 cause = RADIUS_ACCT_TERMINATE_CAUSE_ADMIN_REBOOT;
343
344 if (stop && cause &&
345 !radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_TERMINATE_CAUSE,
346 cause)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800347 wpa_printf(MSG_INFO, "Could not add Acct-Terminate-Cause");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700348 goto fail;
349 }
350
Dmitry Shmidt04949592012-07-19 12:16:46 -0700351 if (radius_client_send(hapd->radius, msg,
352 stop ? RADIUS_ACCT : RADIUS_ACCT_INTERIM,
353 sta->addr) < 0)
354 goto fail;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700355 return;
356
357 fail:
358 radius_msg_free(msg);
359}
360
361
362/**
363 * accounting_sta_interim - Send a interim STA accounting report
364 * @hapd: hostapd BSS data
365 * @sta: The station
366 */
Dmitry Shmidt61d9df32012-08-29 16:22:06 -0700367static void accounting_sta_interim(struct hostapd_data *hapd,
368 struct sta_info *sta)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700369{
370 if (sta->acct_session_started)
371 accounting_sta_report(hapd, sta, 0);
372}
373
374
375/**
376 * accounting_sta_stop - Stop STA accounting
377 * @hapd: hostapd BSS data
378 * @sta: The station
379 */
380void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta)
381{
382 if (sta->acct_session_started) {
383 accounting_sta_report(hapd, sta, 1);
384 eloop_cancel_timeout(accounting_interim_update, hapd, sta);
385 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS,
386 HOSTAPD_LEVEL_INFO,
387 "stopped accounting session %08X-%08X",
388 sta->acct_session_id_hi,
389 sta->acct_session_id_lo);
390 sta->acct_session_started = 0;
391 }
392}
393
394
Dmitry Shmidta54fa5f2013-01-15 13:53:35 -0800395void accounting_sta_get_id(struct hostapd_data *hapd,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700396 struct sta_info *sta)
397{
398 sta->acct_session_id_lo = hapd->acct_session_id_lo++;
399 if (hapd->acct_session_id_lo == 0) {
400 hapd->acct_session_id_hi++;
401 }
402 sta->acct_session_id_hi = hapd->acct_session_id_hi;
403}
404
405
406/**
407 * accounting_receive - Process the RADIUS frames from Accounting Server
408 * @msg: RADIUS response message
409 * @req: RADIUS request message
410 * @shared_secret: RADIUS shared secret
411 * @shared_secret_len: Length of shared_secret in octets
412 * @data: Context data (struct hostapd_data *)
413 * Returns: Processing status
414 */
415static RadiusRxResult
416accounting_receive(struct radius_msg *msg, struct radius_msg *req,
417 const u8 *shared_secret, size_t shared_secret_len,
418 void *data)
419{
420 if (radius_msg_get_hdr(msg)->code != RADIUS_CODE_ACCOUNTING_RESPONSE) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800421 wpa_printf(MSG_INFO, "Unknown RADIUS message code");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700422 return RADIUS_RX_UNKNOWN;
423 }
424
425 if (radius_msg_verify(msg, shared_secret, shared_secret_len, req, 0)) {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800426 wpa_printf(MSG_INFO, "Incoming RADIUS packet did not have correct Authenticator - dropped");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700427 return RADIUS_RX_INVALID_AUTHENTICATOR;
428 }
429
430 return RADIUS_RX_PROCESSED;
431}
432
433
434static void accounting_report_state(struct hostapd_data *hapd, int on)
435{
436 struct radius_msg *msg;
437
438 if (!hapd->conf->radius->acct_server || hapd->radius == NULL)
439 return;
440
441 /* Inform RADIUS server that accounting will start/stop so that the
442 * server can close old accounting sessions. */
443 msg = accounting_msg(hapd, NULL,
444 on ? RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_ON :
445 RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_OFF);
446 if (!msg)
447 return;
448
449 if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_TERMINATE_CAUSE,
450 RADIUS_ACCT_TERMINATE_CAUSE_NAS_REBOOT))
451 {
Dmitry Shmidtcce06662013-11-04 18:44:24 -0800452 wpa_printf(MSG_INFO, "Could not add Acct-Terminate-Cause");
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700453 radius_msg_free(msg);
454 return;
455 }
456
Dmitry Shmidt04949592012-07-19 12:16:46 -0700457 if (radius_client_send(hapd->radius, msg, RADIUS_ACCT, NULL) < 0)
458 radius_msg_free(msg);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700459}
460
461
462/**
463 * accounting_init: Initialize accounting
464 * @hapd: hostapd BSS data
465 * Returns: 0 on success, -1 on failure
466 */
467int accounting_init(struct hostapd_data *hapd)
468{
469 struct os_time now;
470
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -0700471 /* Acct-Session-Id should be unique over reboots. Using a random number
472 * is preferred. If that is not available, take the current time. Mix
473 * in microseconds to make this more likely to be unique. */
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700474 os_get_time(&now);
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -0700475 if (os_get_random((u8 *) &hapd->acct_session_id_hi,
476 sizeof(hapd->acct_session_id_hi)) < 0)
477 hapd->acct_session_id_hi = now.sec;
478 hapd->acct_session_id_hi ^= now.usec;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700479
480 if (radius_client_register(hapd->radius, RADIUS_ACCT,
481 accounting_receive, hapd))
482 return -1;
483
484 accounting_report_state(hapd, 1);
485
486 return 0;
487}
488
489
490/**
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -0700491 * accounting_deinit: Deinitialize accounting
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700492 * @hapd: hostapd BSS data
493 */
494void accounting_deinit(struct hostapd_data *hapd)
495{
496 accounting_report_state(hapd, 0);
497}