Use 64-bit TX/RX byte counters for statistics
authorNick Lowe <nick.lowe@lugatech.com>
Fri, 19 Feb 2016 15:22:25 +0000 (15:22 +0000)
committerJouni Malinen <j@w1.fi>
Sat, 20 Feb 2016 17:03:10 +0000 (19:03 +0200)
commit43022abdb96b7e8e443b26723e9c8c40287a796e
tree45bb9ce6a2d2a85451a8335e294e055d93e91cfa
parent3f81ac0762a1b99e0b4fcbd38fca0f8da6aa7b03
Use 64-bit TX/RX byte counters for statistics

If the driver supports 64-bit TX/RX byte counters, use them directly.
The old 32-bit counter extension is maintained for backwards
compatibility with older drivers.

For nl80211 driver interface, the newer NL80211_STA_INFO_RX_BYTES64 and
NL80211_STA_INFO_TX_BYTES64 attributes are used when available. This
resolves the race vulnerable 32-bit value wrap/overflow. Rework RADIUS
accounting to use these for Acct-Input-Octets, Acct-Input-Gigawords,
Acct-Output-Octets, and Acct-Output-Gigawords, these values are often
used for billing purposes.

Signed-off-by: Nick Lowe <nick.lowe@lugatech.com>
src/ap/accounting.c
src/ap/ctrl_iface_ap.c
src/ap/sta_info.h
src/drivers/driver.h
src/drivers/driver_nl80211.c