Forum Discussion
kykong_107132
Nimbostratus
Jan 26, 2007cannot use if {not} with TCP::payload
Hi All,
I have an irule look like this
============================================================
when CLIENT_ACCEPTED {
TCP::collect 15
}
when CLIENT_DATA {
if { not [TCP::payload] contains "192.168.1.244:80"} {
persist uie "[IP::client_addr]:[TCP::client_port]"
pool Real_Proxy_Servers
}
=============================================================
I able to compile this irule and assign it to a virtual server. but somehow when i tried to access this virtual server, i get error message in /var/log/ltm. Error look like this.
===========================================================================
TCL error: Rule ky_virtual_192.168.6.12_select_pool_rule - can't use non-numeric string as operand of "!" while executing "if { not [TCP::payload 15] contains "192.168.1.244:8443"} ..."
=======================================================================
wondering can we use {if {not}} command together with [TCP::payload]? if cannot, how can we go about this.
thank.
- hoolio
Cirrostratus
I haven't tested this, but you could try wrapping the condition in parens and then not'ing it: - kykong_107132
Nimbostratus
Hi All,
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