chris_connell_1
Apr 21, 2009Nimbostratus
Quickest way to do this
I want to do this in my virtual server irule.
Could someone confirm if for my irule below
only 1 condition is met and i will get this behaviour:
i,e
if the destination address is in the blocked list, its rejected.
OR
if the source matches clients and active mebers are more than 48 forward to ingress pool
OR
if the source is in the testrange then forward to test pool
OR everythign else
forward
Is it better to use a switch/case for this? but there are a few variables here.
when CLIENT_ACCEPTED {
if { [matchclass [IP::local_addr] equals $::blocked]} {
reject
} elseif { [matchclass [IP::remote_addr] equals $::clients] and [active_members Ingress] >= 48 } {
pool Ingress
} elseif { [matchclass [IP::remote_addr] equals $::testpool] } {
pool Ingress-test
} else {
forward
}
}