Problem expanding "%{Calling-Station-Id}"
Alan DeKok
aland at deployingradius.com
Fri May 6 15:02:58 CEST 2016
On May 6, 2016, at 8:53 AM, Ana Gallardo Gómez <anaougu at gmail.com> wrote:
> Here I don't have Calling-Station-Id to my sql query:
>
> (9) preprocess: Executing select query: SELECT username FROM radpostauth
> WHERE client like 'PA%' and reply='Access-Accept' and mac='' and authdate >
> (SELECT DATE_SUB(NOW(),INTERVAL 1 DAY)) order by authdate desc limit 1
Your query is wrong. You cannot put "PA%" into the query. You MUST escape the "%", by using "%%".
Pay attention to the real problem. The Calling-Station-Id exists in the Access-Request, and is expanded everywhere else.
In the query you're worried about, the SQL module returns no results. The Calling-Station-Id exists, so the problem is somewhere else.
So... the problem isn't the expansion of Calling-Station-Id.
Alan DeKok.
More information about the Freeradius-Users
mailing list