25 Jul
2014
25 Jul
'14
11:26 a.m.
Found a bug while trying to use the acct_counters64 policy acct_counters64.preacct { update request { Acct-Input-Octets64 = "%{expr:(%{%{Acct-Input-Gigawords}:-0} * 4294967296) + %{%{Acct-Input-Octets}:-0}}" Acct-Output-Octets64 = "%{expr:(%{%{Acct-Output-Gigawords}:-0} * 4294967296) + %{%{Acct-Output-Octets}:-0}}" } } expr was returning 32 bit signed numbers and overflowing...it should return 64 bit numbers. I believe this needs to be changed in rlm_expr.c static int get_number(REQUEST *request, char const **string, int64_t *answer) - snprintf(out, outlen, "%ld", (long int) result); + snprintf(out, outlen, "%lld", (int64_t) result); -Gabe