Hi, I know this question is probably for the developer list, but I think someone can answer me without any further complications ;) 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? 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 ;) ) ??? Regards, Edvin 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
"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.
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
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? Alan DeKok.
"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.
"Seferovic Edvin" <edvin.seferovic@kolp.at> wrote:
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 ).
Yes, but that doesn't have much to do with RADIUS attributes. If your NAS doesn't send the Gigawords attributes, then why are you worried about people using more than 4G of traffic? Your NAS will never tell the server that the user had more than 4G of traffic.
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 ).
Ah, Ok.
Can you give me some directives how to implement this. Maybe to extend the config of sqlcounter and value_pair struct?
I don't see how that will help if your NAS doesn't send the Gigaword attributes. If it does send them, then yes, you'll have to update the sqlcounter module to handle 64-bit numbers. But you don't need to update any of the valuepair structures. Alan DeKok.
If it does send them, then yes, you'll have to update the sqlcounter module to handle 64-bit numbers. But you don't need to update any of the valuepair structures.
Alan DeKok.
So what variable should I alter to handle 64-bit numbers. As far I have "understood" the check-name value is written to valuepair structure for further comparing. How should this be done ( correctly - since I am not a freeradius developer ) ? I have finished my patch for traffic accounting with Poptop ( I would like to see if it would work with PPPoE ( RP ) Server. Regards, Edvin
participants (2)
-
Alan DeKok -
Seferovic Edvin