Forum Discussion
Stop processing iRule by referencing a variable
Which LTM version are you running? I did a quick test on 11.4.1 and reject; event disable all, return; works as expected.
Can you open a case with F5 Support on this. It should "just work".
tmsh list ltm rule reject*
ltm rule reject_1_rule {
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/reject"}{
log local0. "Calling reject"
reject
event disable all
return
log local0. "Called reject"
}
}
when HTTP_REQUEST priority 501 {
log local0. "Called reject (501)"
}
}
ltm rule reject_2_rule {
when HTTP_REQUEST {
log local0. "reject_2_rule"
}
}
/var/log/ltm output showing the second iRule doesn't get triggered:
Mar 31 20:47:30 ve11a info tmm1[8891]: Rule /Common/reject_1_rule : Calling reject
Mar 31 20:47:30 ve11a err tmm1[8891]: 01230140:3: RST sent from 10.1.0.120:80 to 10.1.0.111:46397, [0x1776da3:4998] iRule execution (reject command)
If I comment out the return statement in the first iRule, I see the rest of that event executed but not anything from the second iRule. This is expected.
If I comment out the return and event disable all statement in the first iRule, I see the rest of iRule 1 executed as well as the second iRule. This is also expected.
Aaron
Recent Discussions
Related Content
* 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