Hey,
Thanks for the tip, though that's FR2-specific solution and I'd like to be able to get this sort out with older deployments
running 1.1.7 or earlier (god forbid! :-) )
That patch for rlm_sqlcounter would be ideal I think.
I think this should also be already pushed into the formal release, this entire support for data information too.
Regards,
Liran.
On Wed, Nov 12, 2008 at 11:02 AM, Flamur Rogova
<flamur@ipko.net> wrote:
liran tal wrote:
Waiting for that traffic limitation patch, Venkatesh.
Thanks.
Hi,
I was stuck with this problem too, and I came up with this solution, which works in my test environment.
The idea is to store allowed bytes in Tmp-Integer-0, than just use unlang to compare user's allowed and actual traffic bytes.
btw, maximum traffic count is 2^31 bytes, if you do it this way.
if(control:Tmp-Integer-0) {
if("%{sql:SELECT SUM(AcctOutputOctets+AcctInputOctets) FROM radacct WHERE UserName='%{User-Name}' }" > "%{control:Tmp-Integer-0}" ) {
# traffic bytes limit reached
reject
}
}
Regards,
Flamur