Multivalued attributes

Phil Mayers p.mayers at imperial.ac.uk
Wed Jul 30 11:51:01 CEST 2014


On 30/07/14 09:21, Herwin Weststrate wrote:

> What would the semantics be if a negative comparison operator would be
> used, like this?
>
>    if (Attr[*] !~ /regex/)
>
> My intuition would say this would only be true if none of the attributes
> matches, instead of if at least one of the attributes matches.

Assuming I've understood correctly, using the analogy of the postgres 
operator, this is more like:

if (any Attr !~ /regex/)

i.e. if any of the attributes *don't* match.

The regex operators would presumably have the special behaviour of 
setting capture groups for the first of the attributes. This doesn't 
have much meaning for !~

> And I'm not sure what the expected result should be in the following
> statement:
>
>    if (Attr[*] > 10)

Likewise

if (any Attr > 10)


More information about the Freeradius-Users mailing list