Probmels with sqlcounter module in FreeRADIUS 2.1.12

Fajar A. Nugraha list at fajar.net
Fri Jun 29 10:05:54 CEST 2012


On Fri, Jun 29, 2012 at 2:58 PM, Andrei Petru Mura <mapandrei at gmail.com> wrote:

> Fri Jun 29 10:20:06 2012 : Info: [hourlycounter] expand: %{sql:SELECT
> SUM(AcctSessionTime -                 GREATER((1340953200 -
> AcctStartTime::ABSTIME::INT4), 0))                 FROM radacct WHERE
> UserName='test1' AND                 AcctStartTime::ABSTIME::INT4 +
> AcctSessionTime > '1340953200'} ->
>
> //***1 Look here!!!
>
> Fri Jun 29 10:20:06 2012 : Debug: rlm_sqlcounter: No integer found in string
> ""
> Fri Jun 29 10:20:06 2012 : Info: ++[hourlycounter] returns noop
>
> //***1

well ... fix that :)

> So, as you can see from my comments, the Session-Timeout attribute isn't
> present in the radius response debug from the first login. The second time
> when it appears, it is caluculated correctly. For now I think that I have an
> issue with FR, so I don't go further to my chillispot NAS yet.
> Do you have some suggestions?

It MIGHT be a bug, somewhat, in the default sql query in that it
returns no integer if there's no previous accounting record. You can
try running the query manually on a user which already logged in
before and on new user.

If you can contribute a fix, please do. Maybe adding some IF/ELSE to
the sql query?

-- 
Fajar


More information about the Freeradius-Users mailing list