Forum Discussion
Need help to understand the flow logic of the irule
1 - What is the difference in using reject and Return in an iRule?
"return" returns back from a proc(edure), if used there.
https://clouddocs.f5.com/api/irules/Procs.html
"return" also returns back from a fired event, if used in an event
https://clouddocs.f5.com/api/irules/Events.html
"reject" is slightly more complicated: All iRule events run based on events that "fire" upon certain checkpoints inside a network flow. When the irule event fires, the flow is temporarily paused and the iRule code runs. When "reject" is called, the flow is marked for removal. Once the code is done and processing resumes on the flow, BIG-IP sends a RST to any TCP-connected endpoints so they stop sending traffic, and the flow is removed from the flow table.
Flows:
https://my.f5.com/manage/s/article/K9077
Reject:
https://clouddocs.f5.com/api/irules/reject.html
2 - Why do we need to set debug 0 in an irule? 3 - Will the same logic will work without an debug?
The "set" command is used to set a variable to a specific value:
Getting Started with iRules: Variables | DevCentral
"debug" doesn't have any special meaning in irules or TCL, but that variable name is commonly used to "turn off and on" extra logging by iRule authors. If the author wrote the code to operate differently depending on the value of that variable, then it will do whatever the author wrote it to do.
4 - What is the use or array set in an irule?
Arrays are a type of variable used in TCL/iRules to hold lists of values:
Hope it helps. If you've further questions about the behavior of your rule, feel free to ask.
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