Forum Discussion

wu123ming_99156's avatar
wu123ming_99156
Icon for Nimbostratus rankNimbostratus
Jul 16, 2008

Global variable does't work in GTM irule???

A simple example:

 

when RULE_INIT {

 

set ::i 0

 

}

 

 

when DNS_REQUEST {

 

log local2. "Global variable $::i"

 

}

 

 

the /var/log/gtm loged the error as follow:

 

011a7001:3: TCL error: Rule test - can't read "::i": no such variable while executing "log local2. "Global variable $::i""

 

 

why??

2 Replies

  • Apparently, RULE_INIT isn't triggered in GTM. Click here for some detail. It's noted in CR95407.

     

     

    As a workaround, you could use a local or global variable in DNS_REQUEST.

     

     

    Aaron