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

r_02_137610's avatar
r_02_137610
Icon for Nimbostratus rankNimbostratus
Nov 13, 2013

nested events?

Can you use nested events in iRules?

For example:

when SERVER_CONNECTED { set portInbound [string tolower [TCP::local_port]]

if { $portInbound = 9999} { blah }
    when HTTP_REQUEST {
            if { $portInbound = 111} {
                    blah blah
    }
    } 

}

1 Reply

  • No you cannot, but further, these events operate in different contexts (client side vs. server side). A few considerations though:

     

    1. You don't need [string tolower ] with a command that returns a number.

       

    2. You're using the [TCP::local_port] command in the SERVER_CONNECTED event, but I'm assuming you mean the incoming listening port. If that's the case, this value would be available from the HTTP_REQUEST event.