evaluating unlang IF with sql results

Alan DeKok aland at deployingradius.com
Fri Jun 14 15:17:49 CEST 2013

Bill Schoolfield wrote:
> Actually this particular issue was the parenthesis around the number. I
> had added
> them in the expression to make sure the math occurred before the logical
> comparison.

  The "man unlang" documentation describes the syntax it expects.
Adding a random paranthesis won't work.

> Without them though, unlang's IF seems to evaluate the first expression
> (a subtraction)
> and ignores things afterwards.

  The first expression is an expansion, via %{expr:...}.  It *does* work.

> So the IF always evaluated to true.
> I've concluded that the use of IF with multiple expressions won't work.

  Well, no.  It does work.

  If you use git "master" branch, it produces much better error
messages.  They were added for precisely these reasons.

  Alan DeKok.

More information about the Freeradius-Users mailing list