Forum Discussion
Cypher
Dec 27, 2021Cirrus
iRule TCL: if 'something' in 'list' then, syntax/parser error
Hi, I'm really breaking my head here. Basicly i need to check if an IP is in a list. If it is not, connection is rejected. With logging commands i was able to determine that the variables ar...
- Dec 27, 2021
I got it to work. I don't think the F5 tcl supports the 'in' operator. So, instead using a of list, I used a string with the contains operator. End result is the same for me :).
if { not ($ipwhiteliststring contains $client_ip) } { reject }
Cypher
Cirrus
I got it to work. I don't think the F5 tcl supports the 'in' operator. So, instead using a of list, I used a string with the contains operator. End result is the same for me :).
if { not ($ipwhiteliststring contains $client_ip) } {
reject
}
jaikumar_f5
Dec 30, 2021MVP
Please mark your answer as solution provided.
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