Forum Discussion
Matt_Williamson
Nimbostratus
Mar 29, 2005iRule to persist on tcp_content
Hi all, I'm trying to write a rule that will search the first 2500 bytes of tcp_content for the "USERNAME=" string and then persist on the next 7 characters after that. Here is my original attempt. ...
vinny_murphy_96
Nimbostratus
Mar 31, 2005Thanks, Matt, Jason,
Jason, I was following your issue with the MSRDP and found it indeed very interesting and was myself quite impressed by the powers of iRules.
However another question rather basic perhaps ?
Can you guys tell me what happens in the case of the first TCP::collect, does this execute indefinitely for a TCP connection seen as the TCP::release is for the inner event :
===========================================================
Do not declare the rule in the script this is just for clarity
rule NonKeep-alivePersistence {
Rule entry point
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
TCP::collect 25
log local0. "persisting:"
set hashKey [findstr [TCP::payload] "X-Client-IP" 13 "\r"]
if the hashKey is not equal to a whitespace/delimiter
if {$hashKey ne ""} {
persist uie $hashKey 1200
pool TestPool
log local0. "Key to persist: $hashKey"
}
Flush collect data and release event hook point
TCP::release
}
}
Finally and most importantly the event ClIENT_DATA when used without CLIENT_ACCEPTED does not seem to turn on its own. I got nothing in the snoop or the logs. Can I use CLIENT_DATA to check the data payload of a TCP connection without executing the event on the connection set-up (CLIENT_ACCEPTED) Of course this is crucial if I want to use keep-alive.
Thanks,
Vin.
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
