SQL syntax error in DHCP + Freeradius 3.x

Arran Cudbard-Bell a.cudbardb at freeradius.org
Mon Jun 23 21:32:50 CEST 2014


On 23 Jun 2014, at 20:20, Marcelo Gondim <gondim at 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 at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140623/54d65030/attachment.pgp>


More information about the Freeradius-Users mailing list