Forum Discussion

Kalyan_Reddy_Da's avatar
Icon for Nimbostratus rankNimbostratus
Aug 12, 2011

TMM crash because of the irule

Below irule is crashing my TMM can anyone please help



We have two values coming in " X-Forwarded-For" HTTP header and we want the first value.




I have written a below irule and when we assign this to VS and access the site, TMM crashing and rebooting F5 server.






while { [HTTP::header exists X-Forwarded-For] } {


set VALUE1 [HTTP::header values X-Forwarded-For]


log local0. "VALUE1 : $VALUE1 "



set VALUE2 [findstr [HTTP::header "X-Forwarded-For"] " " 0 ","]


log local0. "VALUE2: $VALUE2"










Please suggest.



2 Replies

  • Hi Kalyan,



    TMM is crashing as you have an endless loop with that while statement. The X-Forwarded-For header will always exist as you're not removing it.



    If you want to retrieve all values of the XFF header(s), you can use:



    HTTP::header values X-Forwarded-For



    What are you actually trying to do with the values though?



  • Colin_Walker_12's avatar
    Historic F5 Account
    Yeah, an endless loop is a very bad thing in an iRule. Be careful when setting looping parameters. ;)