FreeRADIUS/freeradius-server — pull request #338 by armitasp (2013-06-28 14:29:36+00:00)
Title: minor IPv6 accounting bugfix

Small bug with accounting when using postgres and IPv6 NAS:

Fri Jun 28 15:14:31 2013 : Debug: rlm_sql_postgresql: Status: PGRES_FATAL_ERROR
Fri Jun 28 15:14:31 2013 : Debug: rlm_sql_postgresql: Error invalid input syntax for type inet: "=3F.=3F.=3F.=3F"
Fri Jun 28 15:14:31 2013 : Debug: rlm_sql_postgresql: Postgresql Fatal Error: [22P02: INVALID TEXT REPRESENTATION] Occurred!!
Fri Jun 28 15:14:31 2013 : Error: rlm_sql (sql): Database query error: ERROR: invalid input syntax for type inet: "=3F.=3F.=3F.=3F" LINE 1: ...ame = 'ccspa@scottarmitage.eu' AND NASIPAddress = '=3F.=3F.=... ^

After adding support for IPv6 in the sql queries:

Fri Jun 28 15:18:35 2013 : Debug: rlm_sql (sql): Executing query: 'UPDATE radacct SET AcctStartTime = ('2013-06-28 15:18:35'::timestamp - '0'::interval), AcctStartDelay = 0, ConnectInfo_start = 'CONNECT 54Mbps 802.11a' WHERE AcctSessionId = '51C8B05E-0000002D' AND UserName = 'ccspa@scottarmitage.eu' AND NASIPAddress = '0:0:0:0:0:0:0:1' AND AcctStopTime IS NULL'
Fri Jun 28 15:18:35 2013 : Debug: rlm_sql_postgresql: Status: PGRES_COMMAND_OK
Fri Jun 28 15:18:35 2013 : Debug: rlm_sql_postgresql: query affected rows = 0
Fri Jun 28 15:18:35 2013 : Debug: (26) sql : No records updated
Fri Jun 28 15:18:35 2013 : Debug: (26) sql : No additional queries configured