Forum Discussion
Arnor_Arnason
Jul 13, 2011Altostratus
TCL error: invalid command name "1" on GTM
Hi, I have the following irule on my GTM: when DNS_REQUEST { if { [[active_members Global-webservices.landsbanki.is_A10_pool] = 0] and [[active_members Global-webservi...
hooleylist
Jul 13, 2011Cirrostratus
This looks like a bug in the GTM iRule parser. Here's a simple way to reproduce it:
when DNS_REQUEST {
if { 1 == 1 } {
}
}
Here's a workaround:
when DNS_REQUEST {
if { not [active_members Global-webservices.landsbanki.is_A10_pool] and not [active_members Global-webservices.landsbanki.is_RB_pool] } {
drop
}
elseif { [IP::addr [IP::remote_addr] equals 89.104.145.0/24] } {
if { [active_members Global-webservices.landsbanki.is_A10_pool] } {
pool Global-webservices.landsbanki.is_A10_pool
}
else {
pool Global-webservices.landsbanki.is_RB_pool
}
return
}
elseif { [IP::addr [IP::remote_addr] equals 89.104.148.0/24] } {
if { [active_members Global-webservices.landsbanki.is_RB_pool] } {
pool Global-webservices.landsbanki.is_RB_pool
}
else {
pool Global-webservices.landsbanki.is_A10_pool
}
return
}
elseif { not ([IP::addr [IP::remote_addr] equals 172.27.0.0/16] or [IP::addr [IP::remote_addr] equals 89.104.128.0/19]) } {
drop
}
}
You could open a case with F5 Support to have them look into the issue. It might be fixed already in the current v11 beta as I believe there has been a lot of work done on GTM iRules in the upcoming version.
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects