swo0sh_gt_13163
Nov 29, 2015Altostratus
iRule error
Hello Folks,
I am working on a migration project for a customer. For some reason the iRule isn't allowing me to use "ASM::enable" event within else condition.
Following is the old and new iRules.
The old one:
ltm rule /Common/ABC-URI {
when HTTP_CLASS_SELECTED {
if {[IP::addr [IP::client_addr] equals 10.250.0.0/16]} {
if { [HTTP::uri] contains "/Server/ServletSM" } {
ASM::disable
}
} elseif {( [class match [IP::client_addr] equals ADMIN_Pool] )} {
if { [HTTP::uri] contains "/sv" } {
ASM::disable
}
} elseif { [class match [string tolower [HTTP::uri]] contains CRM_CHAT_URIS] } {
ASM::disable
} else { ASM::enable
}
}
}
Here is the updated copy.
when HTTP_REQUEST {
if {[llength [POLICY::names matched]] > 0} {
if {[IP::addr [IP::client_addr] equals 10.250.0.0/16]} {
if { [HTTP::uri] contains "/VGServer/VGServletSM" } {
ASM::disable
}
} elseif {( [class match [IP::client_addr] equals AD_PORTAL_SV_ECM] )} {
if { [HTTP::uri] contains "/sv" } {
ASM::disable
}
} elseif { [class match [string tolower [HTTP::uri]] contains CRM_CHAT_URIS] } {
ASM::disable
}
}
else {
ASM::enable
}
}
However the "else" part in the Updated iRule doesn't seem to be working. Especially "ASM::enable" event. If I change it to "ASM::disable" it works.
I am failing to understand this.
Any help?
Thank you, Darshan