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

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


Hi,

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.

Greetings,

Stefan Winter

[1] https://dev.mysql.com/doc/refman/5.5/en/integer-types.html

-- 
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

http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0DE6A358A39DC66
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x8A39DC66.asc
Type: application/pgp-keys
Size: 3243 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20140109/98044d1d/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20140109/98044d1d/attachment.pgp>


More information about the Freeradius-Devel mailing list