Send RADIUS gigaword data when OctetsIn or OctetsOut go over UINT32_MAX.
PR: bin/61294 Submitted by: Boris Kovalenko MFC after: 3 weeks
This commit is contained in:
parent
83676de9d5
commit
dfb3194a21
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user