rlm_sqlcounter returning wrong value...

Paweł Soja pawel at msconnect.pl
Wed Mar 23 14:05:42 CET 2011


Hello,
I'm using 2.1.9+dfsg-1ubuntu1. I've got a problem with sqlcounter. I try 
to use it as data limit counter. I've read that this counter has got 2GB 
limit, but I've got problem even with smaller amount of data.

Info: [noresetbytescounter] sql_xlat finished
Debug: rlm_sqlcounter: Check item is greater than query result
Debug: rlm_sqlcounter: Authorized user 00:27:22:02:56:8E, 
check_item=62914560, counter=31610584
Debug: rlm_sqlcounter: Sent Reply-Item for user 00:27:22:02:56:8E, 
Type=Mikrotik-Total-Limit, value=31303976

And it's ok. But when I use monthlybytescounter I have:
Info: [monthlybytescounter] sql_xlat finished
Debug: rlm_sqlcounter: Check item is greater than query result
Debug: rlm_sqlcounter: Authorized user 00:27:22:02:56:8E, 
check_item=52428800, counter=31610584
Debug: rlm_sqlcounter: Sent Reply-Item for user 00:27:22:02:56:8E, 
Type=Mikrotik-Total-Limit, value=31303976
Info: ++[monthlybytescounter] returns ok

It doesn't return 20818216. Dailybytescounter do the same.

Info: [dailybytescounter] sql_xlat finished
Wed Mar 23 13:36:08 2011 : Debug: rlm_sqlcounter: Check item is greater 
than query result
Wed Mar 23 13:36:08 2011 : Debug: rlm_sqlcounter: Authorized user 
00:27:22:02:56:8E, check_item=41943040, counter=6902480
Wed Mar 23 13:36:08 2011 : Debug: rlm_sqlcounter: Sent Reply-Item for 
user 00:27:22:02:56:8E, Type=Mikrotik-Total-Limit, value=31303976
Wed Mar 23 13:36:08 2011 : Info: ++[dailybytescounter] returns ok


I've read that sqlcounter works on time and it's counter is seconds, but 
how can I do "daily/monthly data limit counter" using freeradius?
I found this thread: 
http://lists.freeradius.org/mailman/htdig/freeradius-users/2008-October/msg00966.html 
but it's from 2008 and maybe there is another solution?

Thx for reply
Pawel




More information about the Freeradius-Users mailing list