Schema change advisable for MySQL in 2.2.x and 3.0.x

Stefan Winter stefan.winter at
Thu Jan 9 14:16:04 CET 2014


I just got a funny accounting ticket which made my radsqlrelay hang in a
stuck position again.

The issue was:

Acct-Session-Time = 2152442406

While in range for RADIUS unsigned 32 bit integers, the number itself is
total nonsense of course, but there's nothing I can do about people
sending syntactically correct garbage.

The MySQL schema defines the column for acctsessiontime as

  acctsessiontime int(12) default NULL,

which is a SIGNED integer, and for which the above number is an
overflow. [1]

It would be much more useful to define the schema as

  acctsessiontime int(12) unsigned default NULL,

which would make the allowed ranges of the datatypes of RADIUS and MySQL
schema be in sync.


Stefan Winter


Ingenieur de Recherche
Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et
de la Recherche
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg

Tel: +352 424409 1
Fax: +352 422473

PGP key updated to 4096 Bit RSA - I will encrypt all mails if the
recipient's key is known to me
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x8A39DC66.asc
Type: application/pgp-keys
Size: 3243 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Freeradius-Devel mailing list