Forum Discussion
Chris_Schaefer1
Apr 13, 2007Historic F5 Account
peristence on tcp string
We're trying to peristence on a string in an encrypted tcp session.
After the ssl handshake, the first tcp packet has a user id in the form
xxxxx@website.com then a lot of binary data follows. We would like to persist based upon the xxxxx value and have tried the following irule but are not getting persistence.
when CLIENTSSL_HANDSHAKE {
TCP::collect 300
}
when CLIENT_DATA {
set userID [regexp -nocase {([0-9]*)@website.com} [TCP::payload]]
if { $userID ne ""} {
log local0. "userID is ..$userID..end"
persist uie $userID 1800
}
else {
log local0. "userID not found"
pool no-ID
}
TCP::release
}
Although sniffing confirms the string is there, the logs show userID not found...
Any help would be much appreciated.
- Colin_Walker_12Historic F5 AccountI'd try adding -inline to the regexp, or changing the way you're capturing the variable:
set userID [regexp -nocase -inline { [ 0-9 ]+@website.com} [TCP::payload] ]
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