"Seferovic Edvin" <edvin.seferovic@kolp.at> wrote:
As I "promised", I am patching freeradius ( sqlcounter actually ) so it can do traffic accounting. I have patched it but since I want to have the ability to set the limit by entering the amount of bytes ( in my backend ), I am limited by lvalue of value_pair struct. So values above a (ca) 4 GB are above the limit of uint32 right?
Yes.
I was taking about variable in the struct value_pair ( libradius.h ).
What can I do to increase the limit without crashing the freeradius functions. Can I simply change it to uint64_t ( 2 ^64 should be enough ;) ) ???
See the dictionaries. Use Acct-Input-GigiWords
Okay - but I suppose I will have to patch my NAS ( Poptop server ) to use Acct-Input-GigaWords and Output- instead of Octets. Still if I patch my NAS to send GigaWords.. when I use sqlcounter to count the MBs I will still not be able to compare the check-name which is written into uint32 variable. Shouldn't this be patched too ( I am not a professional programmer - so excuse my "silly" question ).
PS: the patched freeradius is working and is able to account traffic, but I think it would not be RFC compliant because I haven't found the needed attributes in the dictionaries
Which attributes?
Poptop server accepts Session-Octets-Limit for the traffic limit ( actually it is ppp that is doing the limiting ). So Ive added this attribute to my dictionary. PPP also needs Octets-Direction so it can know which traffic flow to count. Ive added both attributes and it is working ( for 2^32 ). Can you give me some directives how to implement this. Maybe to extend the config of sqlcounter and value_pair struct? Thank you in advance
Alan DeKok.