SQL syntax error in DHCP + Freeradius 3.x
Marcelo Gondim
gondim at bsdinfo.com.br
Mon Jun 23 21:20:27 CEST 2014
Hi all,
When I try to connect via dhclient, I receive this syntax error on
radiusd -X:
rlm_sql (sql): Executing query: 'SELECT framedipaddress FROM radippool
WHERE pool_name = 'local' AND (expiry_time < NOW() OR expiry_time IS
NULL) ORDER BY (username <> 'DHCP-08:00:27:93:ff:5d'), (callingstationid
<> '08:00:27:93:ff:5d'), expiry_time LIMIT 1 OR UPDATE'
rlm_sql_mysql: MYSQL check_error: 1064 received
rlm_sql (sql): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'OR UPDATE' at line 1
) ERROR: dhcp_sqlippool : database query error on 'SELECT
framedipaddress FROM radippool WHERE pool_name = '%{control:Pool-Name}'
AND (expiry_time < NOW() OR expiry_time IS NULL) ORDER BY (username <>
'%{User-Name}'), (callingstationid <> '%{Calling-Station-Id}'),
expiry_time LIMIT 1 OR UPDATE'
My allocate_find in mods-config/sql/ippool-dhcp/mysql/queries.conf:
allocate_find = "\
SELECT framedipaddress \
FROM ${ippool_table} \
WHERE pool_name = '%{control:Pool-Name}' \
AND (expiry_time < NOW() OR expiry_time IS NULL) \
ORDER BY \
(username <> '%{User-Name}'), \
(callingstationid <> '%{Calling-Station-Id}'), \
expiry_time \
LIMIT 1 \
OR UPDATE"
I´m using FreeBSD 10-STABLE with mysql 5.5 and Freeradius 3.0.3
Cheers,
Gondim
More information about the Freeradius-Users
mailing list