Forum Discussion

DEI_RSM_IS_7969's avatar
DEI_RSM_IS_7969
Icon for Nimbostratus rankNimbostratus
Nov 19, 2013

TCL error with an iRule

Hi,

 

We have a TCL error with an iRule and we don't understand why. See below the error message and the iRule.

 

Error message : TCL error: /Common/PPG-LBMM1 - can't read "static::mvas_snat_map(10.10.10.133%1)": no such element in array while executing "snat $static::mvas_snat_map([IP::client_addr])" 1220001

 

iRule : when RULE_INIT { array set static::mvas_snat_map { MMSC Auber "10.10.10.129%1" 10.162.225.1 "10.10.10.130%1" 10.162.225.1 "10.10.10.131%1" 10.162.225.1 "10.10.10.132%1" 10.162.225.2 "10.10.10.133%1" 10.162.225.2 "10.10.10.134%1" 10.162.225.2 "10.10.10.135%1" 10.162.225.3 "10.10.10.136%1" 10.162.225.3 "10.10.10.137%1" 10.162.225.3 "10.10.10.138%1" 10.162.225.4 "10.10.10.139%1" 10.162.225.4 "10.10.10.140%1" 10.162.225.4 "10.10.10.141%1" 10.162.225.5 "10.10.10.142%1" 10.162.225.5 "10.10.10.143%1" 10.162.225.5 "10.10.10.144%1" 10.162.225.6 "10.10.10.146%1" 10.162.225.6 "10.10.10.147%1" 10.162.225.6 "10.10.10.148%1" 10.162.225.7 "10.10.10.149%1" 10.162.225.7 "10.10.10.150%1" 10.162.225.7 "10.10.10.151%1" 10.162.225.8 "10.10.10.152%1" 10.162.225.8 "10.10.10.152%1" 10.162.225.8 MMSC Archives "10.10.12.129%1" 10.162.225.9 "10.10.12.130%1" 10.162.225.9 "10.10.12.131%1" 10.162.225.9 "10.10.12.132%1" 10.162.225.10 "10.10.12.133%1" 10.162.225.10 "10.10.12.134%1" 10.162.225.10 "10.10.12.135%1" 10.162.225.11 "10.10.12.136%1" 10.162.225.11 "10.10.12.137%1" 10.162.225.11 "10.10.12.138%1" 10.162.225.12 "10.10.12.139%1" 10.162.225.12 "10.10.12.140%1" 10.162.225.12 "10.10.12.141%1" 10.162.225.13 "10.10.12.142%1" 10.162.225.13 "10.10.12.143%1" 10.162.225.13 "10.10.12.144%1" 10.162.225.14 "10.10.12.145%1" 10.162.225.14 "10.10.12.146%1" 10.162.225.14 "10.10.12.147%1" 10.162.225.15 "10.10.12.148%1" 10.162.225.15 "10.10.12.149%1" 10.162.225.15 "10.10.12.150%1" 10.162.225.16 "10.10.12.151%1" 10.162.225.16 "10.10.12.152%1" 10.162.225.16 } }

 

when CLIENT_ACCEPTED { snat $static::mvas_snat_map([IP::client_addr]) if { [IP::addr [IP::client_addr] equals 10.10.10.128%1/27 ] } { pool Pool_PPG_WISP3_PTF } elseif { [IP::addr [IP::client_addr] equals 10.10.12.128%1/27 ] } { pool Pool_PPG_WISP2_PTF } }

 

Thank you for your help.

 

Regards,

 

2 Replies

  • Hello, I had the same problem and identified that when I changed a rule with static array in RULE_INIT event, do not know why, the rule simply ignored my changes. For example, if I ignore the line declaring the array or changed the value of it, the CLIENT_ACCEPTED event could still access it with old values​​. What I did was boot the BIG-IP and then he began to accept my new code rule. You got a solution for this case? Thank you.