iRule parsing errors after upgrading BigIP to 13.1.3 version
Hi All,
Does anyone know why we are getting this iRule parsing or formatting error after upgrading our BigIP from 12.x to version 13.1.3.3? After upgrading, the irule that was working is no longer working and causing the website not to load. Not sure why the newer version of this code is disregarding the syntax for the "Check_IP" field. Can only one help in changing the irule so that it will work?
It looks like it has to do with the "CHECK_IP" get field. What we are doing is checking the XFF header first to see the client IP and make decision based on that to allow or deny the URIs the go to.
Error:
err tmm3[16683]: 01220001:3: TCL error: /Common/Web-iRule <HTTP_REQUEST> - bad IP network address format (line 5)invalid IP match item for IP class /Common/Data-Group-Allowed-IPs (line 5) invoked from within "class match $CHECK_IP eq Data-Group-Allowed-IPs"
when HTTP_REQUEST {
if { [active_members POOL-EXT-WEB-SERVERS] < 1 } {
HTTP::redirect " http://maintenance.domain.com"
} else {
set CHECK_IP [getfield [HTTP::header values X-Forwarded-For] " " 1]
if { !([class match $CHECK_IP eq Data-Group-Allowed-IPs]) } {
if { [class match [HTTP::uri] eq Data-Group-URI-List] } {
reject }
}
switch -glob [HTTP::uri] {
"*/level1/level2/portal/login*" -
"*/level3/testlogin1*" -
"*/aa/bb/portal/testlogin2*" {
if { ([class match $CHECK_IP eq Data-Group-Allowed-IPs]) } {
if { [HTTP::uri] contains "/home/admin1" } {
HTTP::redirect "https://[HTTP::host]/home/admin2"
} else {
HTTP::redirect "https://[HTTP::host]/aa/bb/login/"
}
}
}
}
}
}