Kevin_Leicht_51
Sep 10, 2013Nimbostratus
Problem with iRule upgrading to 11.4.
I'm trying to upgrade to 11.4 but am at a bit of a loss to know how to replace the HTTP_CLASS_SELECTED functionality we currently have in one of our iRules. The iRule aborts a session when it encounters a user-agent listed in the 'UserAgentBlacklist' data group, but it then checks to see if there's an ASM class assigned, and if so, it disables ASM. Without the last part, we were getting error messages written to the log. Any idea on how to rewrite this iRule in 11.4?
Code when HTTP_REQUEST {
set abort_trans 0
if { [class match -- [string tolower [HTTP::header "User-Agent"]] contains AVUserAgentBlacklist ] } {
set abort_trans 1}}
when HTTP_CLASS_SELECTED {
if {[HTTP::class asm]==1}{
if {$abort_trans==1}{
ASM::disable
drop }}
else
{if {$abort_trans==1}
{drop }}}