Forum Discussion

Mario_Eury_6049's avatar
Mario_Eury_6049
Icon for Nimbostratus rankNimbostratus
Oct 02, 2006

CASE instead of nested if/then

I am relatively new with using IRULES. However, I would like to know if there any way to use CASES instead of nested if/then statements within a rule? I have a pretty big rule to write to direct traffic between one pool/server to the other based on a host's ip address/network segment.

 

 

something like this:

 

 

myirule{

 

when client_accepted {

 

if {[ip::addr [ip::remote_addr] equal 192.168.100.1/24] }{

 

pool firstpool

 

} else {

 

pool secondpool

 

}

 

}