lists.freeradius.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

Giedrius Baronas

24 Nov 2021 24 Nov '21
4:48 p.m.

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

0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.12.