Showing results for 
Search instead for 
Did you mean: 

google 2fa irule error


I'm struggling with this error when doing "load sys config verify

[use curly braces to avoid double substitution]

full error message

/Common/Google_Token:131: warning: [use curly braces to avoid double substitution][(0x{[string range ${token} ${offset} [expr {${offset} + 7}]]}]

The irule line in original code was

set ga_code [expr (0x[string range $token $offset [expr $offset + 7]] & 0x7FFFFFFF) % 1000000]

And I changed it to

set ga_code [expr (0x[string range ${token} ${offset} [expr {${offset} + 7}]] & 0x7FFFFFFF) % 1000000]

I'm able to connect to APM and passing the token , it is working fine there, but this cannot get rid of this error message


Any one can help with the correct syntax ?

article seems not to be very helpful


Dear Abed,

checking the F5 knowledgebase article, I would interpret the correct syntax as follows:

set ga_code [expr {0x[string range $token $offset [expr {$offset + 7}]] & 0x7FFFFFFF} % 1000000]

But I don't have tested it right now, so please give it a try.

Thank you!



Stefan 🙂

I actually tried this

The F5 accept the irule

and the error disappears

but the APM connection is not working anymore

when I try to connect , I pass the username / password , then I type the OTP , and when I click 'next' the APM resets the connection and start over from the beginning

so it stop resuming to establishing the connection