Unlang comparing variable correctly
Tyller D
tyllerd at gmail.com
Fri May 3 17:03:41 CEST 2013
Hi,
I am trying to compare a variable in freeradius using unlang but it seems
to not be working correctly, more than likely i've made a mistake but let
me show you.
? Evaluating (control:IMS-ActiveDirectory == 0) -> FALSE
++? if (control:IMS-ActiveDirectory == 0) -> FALSE
++? if (control:IMS-Timeout < 0)
? Evaluating (control:IMS-Timeout < 0) -> FALSE
++? if (control:IMS-Timeout < 0) -> FALSE
++? elsif (control:IMS-Timeout > 0)
? Evaluating (control:IMS-Timeout > 0) -> FALSE
++? elsif (control:IMS-Timeout > 0) -> FALSE
++? if (control:IMS-Data < 0)
? Evaluating (control:IMS-Data < 0) -> TRUE
++? if (control:IMS-Data < 0) -> TRUE
++- entering if (control:IMS-Data < 0) {...}
expand: %{control:IMS-Data} Voucher Depleated -> 3221197824 Voucher
Depleated
+++[reply] returns noop
+++[reject] returns reject
So as you can see it enters entering if (control:IMS-Data < 0) {...}, as it
says that IMS-Data is < 0. Its not, so I echoed out the variable in the
next line and its value is 3221197824...
The strange thing is if the variable is equal to 2147465216 then it does
not enter that function.
Why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130503/4e41edae/attachment.html>
More information about the Freeradius-Users
mailing list