ulang AND / OR Condition

Neville nev at itsnev.co.uk
Sat Apr 10 15:09:11 CEST 2010


Hi,

I'm having problems with huntgroups working correctly, so I would like to continue to use "if,elseif" condition.

Instead of having a line for each NAS-IP-Address e.g.

elsif(NAS-IP-Address == 1.1.1.10 && SQL-GROUP == "GROUP1"){
ok
}
elsif(NAS-IP-Address == 1.1.1.20 && SQL-GROUP == "GROUP1"){
ok
}
elsif(NAS-IP-Address == 1.1.1.30 && SQL-GROUP == "GROUP1"){
ok
} else {
reject
}

Can I do something like

if(NAS-IP-Address == 1.1.1.10 OR 1.1.1.20 OR 1.1.1.30 AND SQL-GROUP == "GROUP1"){
ok
} else {
    reject
}

Or is there a better way of doing this?

Thx
Nev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100410/4c2cb823/attachment.html>


More information about the Freeradius-Users mailing list