No subject
Giedrius Baronas
g.baronas at gmail.com
Wed Nov 24 22:48:44 CET 2021
Hi,
I read a manual about comparisons. If I write IP without network mask then
it works but if IP with mask I get error
Maybe who sees where I make a mistake?
>From https://freeradius.org/radiusd/man/unlang.txt
Comparisons
(foo == bar) Compares 'foo' to 'bar', and evaluates to true
if the comparison holds true. Valid comparison operators are
"==", "!=", "<", "<=", ">", ">=", "=~", and "!~", all with their
usual meanings. The operators ":=" and "=" are assignment oper-
ators, and are not allowed for comparisons.
The operators "<", "<=", ">", and ">=" are also allowed for
checking that an IP address is contained within a network. For
example: if (<ipaddr>192.0.2.1 < 192.0.2.0/24) { This com-
parison succeeds, because the address 192.0.2.1 is contained
within the network 192.0.2.0/24.
My debug:
Wed Nov 24 21:35:27 2021 : Debug: (1) if ( <ipaddr>NAS-IP-Address
== 192.0.2.0/24 ){Wed Nov 24 21:35:27 2021 : ERROR: (1) Failed
casting rhs operand: Invalid IPv4 mask length "/24". Only "/32"
permitted for non-prefix typesWed Nov 24 21:35:27 2021 : ERROR: (1)
Failed retrieving values required to evaluate condition
--
Pagarbiai,
Giedrius
861569551
More information about the Freeradius-Users
mailing list