For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

speachey's avatar
speachey
Icon for Cirrus rankCirrus
Dec 16, 2021

command to exit an iRule but continue processing other iRules

is there a command to exit an iRule and move to the next iRules? I want to add an IF statement and if true, exit the current iRule but continue processing any additional iRules. I'm using "return" several times within the rule to bypass sections:

 

 # return if foo app server

  if { [class match [IP::client_addr] equals foo_exclusions]} {

      return

  }

 

This works to return past several sections of the rule but I'm looking for a way to exit the current rule if the first IF statement = TRUE. Is there a way to do that? Thanks in advance!

1 Reply

  • I don't think there is such a specific iRule command. You probably can achieve the same logic with use of the 'event' and 'priority' statement. See:

     

    https://clouddocs.f5.com/api/irules/event.html

    https://clouddocs.f5.com/api/irules/priority.html