Alan DeKok <[EMAIL PROTECTED]> wrote
> Hugh Messenger wrote:
> > If I wrap an 'if' statement round something (in this case a query in
> > mysql_dialup.conf), any config items seem to get blown away.
> 
>   You can't.  "if" is a processing directive that is valid only when
> packets are being processed.  The configuration items are parsed once
> when the server starts, and don't change after that.
> 
> > So for instance:
> 
>   It would be very nice to be able to do that, but it would also be very
> difficult to implement.

It would be very nice, and very intuitive.  How hard would it be to just
provide that one simple construct ("if <config item related condition> {}")
during parsing of the startup config?  No need for the whole of unlang.
More of an 'ifdef' style pre-processing directive than an integrated part of
the language.

I know you have bigger fish to fry at the moment, just a thought for the
future.

> The solution is to add a layer of indirection:
> 
>   authorize_reply_query = "%{control:Tmp-String-0}"
> 
>   Then, while processing the request, set:
> 
>       update control {
>               Tmp-String-0 = "..."
>       }
> 
>   That *should* work, I think.

I'll let you know.

>   Alan DeKok.

   -- hugh



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to