HostAP, accounting Stop, and input/output octets

Alan DeKok aland at deployingradius.com
Fri Dec 18 08:50:48 PST 2015


 I've had a report that HostAP doesn't send Acct-Input-Octets / Acct-Output-Octets in Accounting-Request packets with Acct-Status-Type = Stop.

 Some spelunking through the code leads me to believe that this is likely.  src/ap/accounting.c has:

static void accounting_sta_report(struct hostapd_data *hapd,
				  struct sta_info *sta, int stop)
...

	if (accounting_sta_update_stats(hapd, sta, &data) == 0) {
		... add octet counters

	}

 The accounting_sta_update_stats() function returns -1 if hostapd_drv_read_sta_data() fails.

 What would be better is if it sent the last stats even if that function failed.  Patch is attached.  90% of the change is indentation.

 Alan DeKok.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Always-send-the-last-stats-we-had-even-if-we-can-t-g.patch
Type: application/octet-stream
Size: 3611 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20151218/03a34e39/attachment-0001.obj>


More information about the Hostap mailing list