Official release of pppd doesn't support Acct-Input-Gigawords and Acct-Output-Gigawords attributed which were specified in RFC 2869. More information here: http://www.ietf.org/rfc/rfc2869.txt I'm not C programmer but i rewrite patch from cflinux distribution (http://www.cflinux.hu/). I hope, this can be helpful for others, to write "real" patch :) I tested it with freeradius 1.1.3 and attributes was send correctly.
Created attachment 102981 [details, diff] radius-gigawords.patch Add support for Acct-Gigawords attribute (RFC 2869)
This has nothing to do with portage
(In reply to comment #2) > This has nothing to do with portage > Sorry for this mistake, but this my first bug report. Can you point me where I post this bug, or how to move it to good place?
Please, send such stuff upstream. Thanks.
The patch doesn't look OK to me. Reasons for not including this patch: 1) it messes up with Makefile.linux although it should stay away of that file. 2) Although the patch is increasing the size of pppd_stats fields that won't do you any good. Even though the modified get_ppp_stats() apparently solve the incompatibility between the internal 64-bit and system 32-bit couters, it does it in the wrong way: 2.1) get_ppp_stats() usually is called only on link disconnect event, when it is probably too late to detect the overflow. The right way would be to call this function periodically, with a time period selected in such manner so it would be imposssible to have undetected overflows. 2.2) get_ppp_stats() doesn't try to detect the overflow, which makes the new function equivalent with the old one. The only difference is that the new version requires 3x more memory space. Conclusion: this patch will not be included in net-dialup/ppp unless it will be re-designed.
I've misread the patch. I think get_pppd_stats() is correct. The substraction is made between pairs of u32 counters, which means it will correctly compute the result in the event of an overflow. But you still have the problem of stats not being periodically updated...