Forum Discussion
mbaertl_132813
Nimbostratus
May 13, 2014LTM - I-Rule http_process_state_prepend - Invalid action
Hi,
we have a new issue since an upgrade from 11.2. to 11.5. One of our I-rules is not working anymore and we only have a hint to an invalid action. Is there any chance to see what syntax is responsi...
mbaertl_132813
Nimbostratus
Jun 04, 2014Hi Kevin,
thanks a lot for your proposals and good comments. I have reworked the I-rule completely and I get an error when using elseif. I have version 11.5.1 HF2 and it seem elseif is not supported.
when HTTP_REQUEST_DATA {
log local0.info "$LogString: REQUEST_DATA triggered"
if {[class match [IP::client_addr] equals authError]}
{
log local0.info "$LogString: REQUEST_DATA authError"
if { [HTTP::payload] contains "6 BOOTSTRAP" }
{
log local0.info "$LogString: contains Bootstrap - send 503"
HTTP::respond 503
}
else
{
log local0.info "$LogString: contains other than Bootstrap - send to Bootstrap - pool APPL_iwe"
pool APPL_iwe
}
}
else
{
log local0.info "$LogString: Filter_noserial REQUEST_DATA no_auth_error"
if { [HTTP::payload] contains "" }
{
log local0.info "$LogString: Filter_noserial matched - send 204"
HTTP::respond 204 "Connection" "close"
}
if { [HTTP::payload] contains "Router" }
{
log local0.info "$LogString: Filter_ROUTER - set Router PRGAV4202N"
HTTP::payload replace 0 [HTTP::payload length] [string map -nocase "Router PRGAV4202N" [HTTP::payload]]
}
if { [HTTP::payload] contains ">0.0.0.0" }
{
log local0.info "$LogString: Filter_replace 0.0.0.0 with client IP"
set client_ip [IP::client_addr]
HTTP::payload replace 0 [HTTP::payload length] [string map -nocase ">0.0.0.0 >$client_ip" [HTTP::payload]]
}
else
{
log local0.info "$LogString: REQUEST_DATA else - disable"
HTTP::disable
}
log local0.info "$LogString: REQUEST_DATA completed"
}
}
If I use elseif I get following error:
01070151:3: Rule [/Common/public_20140602] error: /Common/public_20140602:100: error: [undefined procedure: elseif][elseif { [HTTP::payload] contains "Router" }
{
log local0.info "$LogString: Filter_ROUTER - set Router PRGAV4202N"
HTTP::payload replace 0 [HTTP::payload length] [string map -nocase "Router PRGAV4202N" [HTTP::payload]]
} ]
Any idea why this is an undefined procedure? br, Matthias
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects