Problem with expire_on_login module and users with large connection periods

Arran Cudbard-Bell a.cudbardb at
Wed Feb 5 13:04:58 CET 2014

On 5 Feb 2014, at 10:47, Antonio Fernández Pérez <antoniofernandez at> wrote:

> Hi list, 
> Sorry, the last email had subject empty.
> I think that there are a mistake in sqlcounter_expire_on_login module with large uses. I have detected that users with three duration months could navigate more than three months.
> The problem is with the use of TIME_DIFF function that is limited to the range allowd for TIME's values. By default, TIME's range is '-838:59:59' to '838:59:59', thirty four days, more or less. So if you have a username of two months and this uses expre_on_login module, there are a problem!
> I have fixed the problem modifying the query on module file: I have replaced "TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime))" by "TIMESTAMPDIFF(SECOND,
> acctstarttime, NOW())" and now works fine.
> Please, let me know if this is a bug in FreeRADIUS or If I have a mistake in my configuration (In MySQL or FreeRADIUS services).

I guess it's a bug in the query, i'll update it.


Arran Cudbard-Bell <a.cudbardb at>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the Freeradius-Users mailing list