Forum Discussion
Carl_28880
Nimbostratus
Nov 13, 2012V4 to v11 irule assistance required
Hi, could you assist me in the following irule conversion from version 4 to version 11.
Version 4 Irule:
rule test{
if (tcp_content contains "test") {
use pool test_pool ...
hoolio
Cirrostratus
Nov 13, 2012Hi Carl,
Can you try this?
when CLIENT_ACCEPTED {
Check if the first packet contains "test"
if { [TCP::payload] contains "test"} {
pool test_pool
} elseif { [TCP::payload length] < 50 } {
Collect at least 50 bytes.
This triggers CLIENT_DATA when at least 50 bytes have been collected.
TCP::collect 50
} else {
log "Unrecognised test discarding [IP::client_addr]"
discard
}
}
when CLIENT_DATA {
if { [TCP::payload] contains "test"} {
pool test_pool
Release collected data
TCP::release
} else {
log "Unrecognised test discarding [IP::client_addr]"
discard
}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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