SQL syntax error in DHCP + Freeradius 3.x
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
On 23 Jun 2014, at 20:20, Marcelo Gondim <gondim@bsdinfo.com.br> wrote:
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'
Your query is invalid? It's pretty damn clear TBH, Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (2)
-
Arran Cudbard-Bell -
Marcelo Gondim