rlm_sql: "NUMERIC VALUE OUT OF RANGE" error

Vegard Svanberg vegard at svanberg.no
Fri Sep 26 10:08:17 CEST 2008


Freeradius 2.1.0.

I have a NAS which sends a NAS-Port-Id attribute in the range
2147483648..2164260863. PostgreSQL doesn't like the query Freeradius
performs. It's choking when trying to insert for instance
'2163214239::integer' into the radacct table.

$ select 2163214239::integer;
ERROR:  integer out of range

Example:

INSERT INTO radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime,   AcctSessionTime, AcctAuthentic, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId,   CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStopDelay)   values('80f0079f',   '5c9f0b7076dcc9c0',   'username',   NULLIF('', ''),   '1.2.3.4',   2163214239::integer,   'Wireless-802.11',   ('2008-09-26 09:52:52'::timestamp - '1'::interval - '3382'::interval),   ('2008-09-26 09:52:52'::timestamp - '1'::interval),   NULLIF('3382', '')::bigint, '',   '',   (('0'::bigint << 32) + '57743'::bigint),   (('0'::bigint << 32) + '294709'::bigint),   'hotspot',   'XX:XX:XX:XX:XX:XX',   'Lost-Service',   '',   '',   NULLIF('192.168.12.94', '')::inet, 0)

rlm_sql_postgresql: Status: PGRES_FATAL_ERROR
rlm_sql_postgresql: Error integer out of range
rlm_sql_postgresql: Postgresql Fatal Error: [22003: NUMERIC VALUE OUT OF RANGE] Occurred!!
[sql] Couldn't insert SQL accounting STOP record - ERROR:  integer out of range
rlm_sql (sql): Released sql socket id: 3
++[sql] returns fail

Quick fixes...?

-- 
Vegard Svanberg <vegard at svanberg.no> [*Takapa at IRC (EFnet)]




More information about the Freeradius-Users mailing list