unlang & expr
Alan DeKok
aland at deployingradius.com
Fri May 18 13:26:28 CEST 2018
On May 18, 2018, at 7:20 AM, <petr.linke at seznam.cz> <petr.linke at seznam.cz> wrote:
> I need do some arithmetic operation in the soh-server, so I tried use the
> expr module.
>
> example:
> server soh-server {
> ...
> update control {
> &Tmp-Integer-1 := %{expr: 1 + 2 + 3}
> }
>
> But from syntax checker I received error message: "Syntax error: Expected
> comma after '%{expr:': 1 + 2 + 3}"
>
> Is possible use expr in this case?
Yes.
The %{...} syntax is for *string* expansions. So you need to do use strings:
&Tmp-Integer-1 := "%{expr: 1 + 2 + 3}"
More information about the Freeradius-Users
mailing list