summaryrefslogtreecommitdiff
path: root/accel-pppd/extra
diff options
context:
space:
mode:
authorDmitriy Eshenko <dmitriy.eshenko@accel-ppp.org>2022-11-15 10:23:35 +0300
committerGitHub <noreply@github.com>2022-11-15 10:23:35 +0300
commit474de35992ca918df0fd574d0cf6a403c67ba68f (patch)
tree00aa24865376b603f43d82e42c5490e1d4e6e2fe /accel-pppd/extra
parenta6aa7c279d2713c6723731029092199713d21257 (diff)
downloadaccel-ppp-474de35992ca918df0fd574d0cf6a403c67ba68f.tar.gz
accel-ppp-474de35992ca918df0fd574d0cf6a403c67ba68f.zip
SNMP: Fix previous migration to 64 bit counters
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_data_access.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_access.c b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
index 41c72686..ee3c9eff 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_data_access.c
+++ b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
@@ -201,7 +201,7 @@ sessionTable_container_load(netsnmp_container *container)
sessionTable_rowreq_ctx *rowreq_ctx;
size_t count = 0;
struct ap_session *ses;
- struct rtnl_link_stats stats;
+ struct rtnl_link_stats64 stats;
DEBUGMSGTL(("verbose:sessionTable:sessionTable_container_load","called\n"));
@@ -240,10 +240,10 @@ sessionTable_container_load(netsnmp_container *container)
ap_session_read_stats(ses, &stats);
rowreq_ctx->data->rx_pkts = stats.rx_packets;
rowreq_ctx->data->rx_bytes = stats.rx_bytes;
- rowreq_ctx->data->rx_gw = ses->acct_input_gigawords;
+ rowreq_ctx->data->rx_gw = stats.rx_bytes >> (sizeof(uint32_t) * 8);
rowreq_ctx->data->tx_pkts = stats.tx_packets;
rowreq_ctx->data->tx_bytes = stats.tx_bytes;
- rowreq_ctx->data->tx_gw = ses->acct_output_gigawords;
+ rowreq_ctx->data->tx_gw = stats.tx_bytes >> (sizeof(uint32_t) * 8);
CONTAINER_INSERT(container, rowreq_ctx);