<div dir="ltr"><div><div><div><div>Hi,<br><br></div>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.<br><br>
? Evaluating (control:IMS-ActiveDirectory == 0) -> FALSE<br>++? if (control:IMS-ActiveDirectory == 0) -> FALSE<br>++? if (control:IMS-Timeout < 0)<br>? Evaluating (control:IMS-Timeout < 0) -> FALSE<br>++? if (control:IMS-Timeout < 0) -> FALSE<br>
++? elsif (control:IMS-Timeout > 0)<br>? Evaluating (control:IMS-Timeout > 0) -> FALSE<br>++? elsif (control:IMS-Timeout > 0) -> FALSE<br>++? if (control:IMS-Data < 0)<br>? Evaluating (control:IMS-Data < 0) -> TRUE<br>
++? if (control:IMS-Data < 0) -> TRUE<br>++- entering if (control:IMS-Data < 0) {...}<br> expand: %{control:IMS-Data} Voucher Depleated -> 3221197824 Voucher Depleated<br>+++[reply] returns noop<br>+++[reject] returns reject<br>
<br><br></div>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...<br><br></div>
The strange thing is if the variable is equal to 2147465216 then it does not enter that function. <br><br></div>Why?<br></div>