diff options
author | dds <dds@FreeBSD.org> | 2004-05-19 21:00:42 +0000 |
---|---|---|
committer | dds <dds@FreeBSD.org> | 2004-05-19 21:00:42 +0000 |
commit | 720549589564b28a70878c62b08e93b68dd64122 (patch) | |
tree | 1ce990191b55502d4e543242b01b2bccb278d833 /usr.sbin/ppp | |
parent | 6707e287ca6009b043111ee945046937b38fb742 (diff) | |
download | FreeBSD-src-720549589564b28a70878c62b08e93b68dd64122.zip FreeBSD-src-720549589564b28a70878c62b08e93b68dd64122.tar.gz |
Send RADIUS gigaword data when OctetsIn or OctetsOut go over UINT32_MAX.
PR: bin/61294
Submitted by: Boris Kovalenko
MFC after: 3 weeks
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/radius.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c index 75fa78d..06f716b 100644 --- a/usr.sbin/ppp/radius.c +++ b/usr.sbin/ppp/radius.c @@ -27,6 +27,7 @@ * */ +#include <stdint.h> #include <sys/param.h> #include <sys/socket.h> @@ -1144,9 +1145,11 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl, if (acct_type == RAD_STOP) /* Show some statistics */ - if (rad_put_int(r->cx.rad, RAD_ACCT_INPUT_OCTETS, stats->OctetsIn) != 0 || + if (rad_put_int(r->cx.rad, RAD_ACCT_INPUT_OCTETS, stats->OctetsIn % UINT32_MAX) != 0 || + rad_put_int(r->cx.rad, RAD_ACCT_INPUT_GIGAWORDS, stats->OctetsIn / UINT32_MAX) != 0 || rad_put_int(r->cx.rad, RAD_ACCT_INPUT_PACKETS, stats->PacketsIn) != 0 || - rad_put_int(r->cx.rad, RAD_ACCT_OUTPUT_OCTETS, stats->OctetsOut) != 0 || + rad_put_int(r->cx.rad, RAD_ACCT_OUTPUT_OCTETS, stats->OctetsOut % UINT32_MAX) != 0 || + rad_put_int(r->cx.rad, RAD_ACCT_OUTPUT_GIGAWORDS, stats->OctetsOut / UINT32_MAX) != 0 || rad_put_int(r->cx.rad, RAD_ACCT_OUTPUT_PACKETS, stats->PacketsOut) != 0 || rad_put_int(r->cx.rad, RAD_ACCT_SESSION_TIME, throughput_uptime(stats)) |