largest length of numeric comparison in unlang?
Alan DeKok
aland at deployingradius.com
Tue Apr 4 17:42:11 CEST 2017
On Apr 4, 2017, at 10:29 AM, <adrian.p.smith at bt.com> <adrian.p.smith at bt.com> wrote:
>
> If I'm doing a <= or >= comparison in unlang, is there a limit to the size of the numbers?
>
> i.e. I'm guessing that they use some sort of number type in the code?
Yes.
If you're comparing attributes, the numbers are the same type as the attribute:
if (NAS-Port == 0) {
0 is type of NAS-Port, or 32-bit integer
if (NAS-Port == 4294967298) {
Won't work, as the number is too big to fit into NAS-Port.
i.e. you can probably do it, but it doesn't make sense, because the check will always fail.
Alan DeKok.
More information about the Freeradius-Users
mailing list