Forum Discussion

Andrew_Bretten_'s avatar
Andrew_Bretten_
Icon for Nimbostratus rankNimbostratus
Jan 25, 2012

iRule parser adds characters to my code ?

So this is my original code I type in the Irule box.

 

 

when DNS_REQUEST

 

{

 

set crday [clock format [clock seconds] -format {%a} ]

 

log local0. "IR-VPNautomaint: Test $crday"

 

}

 

 

I click update, the screen refreshes and I see

 

 

set crday [clock format [clock seconds] -format {%25a} ]

 

 

I click update again and I see

 

 

set crday [clock format [clock seconds] -format {%2525a} ]

 

 

I click update again and I see

 

 

set crday [clock format [clock seconds] -format {%252525a} ]

 

 

and so on.......

 

4 Replies

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Wow, that's a new one to me! Interesting. What version are you running so I can try to reproduce, hopefully?

     

     

    Also, is it other characters as well? (%b %c, etc.) or just %a?

     

     

    Thanks,

     

    Colin
  • 10.2.1 Build 511.0 HF3 yes it happens with other formatting codes I had originally, I just chopped down the code to make the example shorter.
  • This looks like a bug in the GTM iRule parsing logic where the percent is being URL encoded. I'd guess it's probably a known issue, but you could open a case with F5 Support to confirm/escalate it.

    You can repro it using a simple iRule:

    
    when DNS_REQUEST {
       log local0. "%"
    }
    

    Aaron
  • I think it's specific to the GUI parsing of GTM iRules as the iRule editor can save/reload a rule with a % normally.

     

     

    Aaron