Variables' content as a reply -- SOLVED

Augusto G. Andreollo guto at ccuec.unicamp.br
Tue Mar 10 20:03:15 CET 2009


> Sorry, it's "%{reply:User-Name}". From man unlang about strings:
> 
> "Double-quoted strings are expanded by inserting the value of any
> variables (see VARIABLES, below) before being evaluated. If the result
> is a number it is evaluated in a numerical context.
> 
> ..
> 
> Single-quoted strings are evaluated as-is. Their values are not expanded
> as with double-quoted strings above, and they are not interpreted as
> attribute references."

I got it to work, you were right on target about the double-quotes. My
real problem was that I was simply pointing to the wrong thing.

My original block was reading
> update outer.reply {
>     User-Name := "%{reply:User-Name}"
> }

That returns empty, since the inner reply does not contain any User-Name
information. The correct block (which is working now) is:
> update outer.reply {
>     User-Name := "%{request:User-Name}"
> }

So, everything seems fine now.. Thanks all for your help, especially
Kalik.. :)







More information about the Freeradius-Users mailing list