Forum Discussion
collinz1_17223
Jan 18, 2011Nimbostratus
iRule using findstr in TCP payload
I am trying to create an irule that will search the TCP response from a server for the userData: value and them persist based on that. The irule is below, which i have associated with a Universal persistence profile, but when i try to initiate a connection, no connection is being established to one of the load balanced servers. If i remove the persistence profile i am load balanced fine:
when SERVER_CONNECTED {
TCP::collect 1500
}
when SERVER_DATA {
set usrid [findstr [TCP::payload] "userData:" 9]
if {$usrid ne ""} {
persist uie $usrid
}
}
- hooleylistCirrostratusAre you sure the failure is that no serverside connection is attempted or established? The iRule shouldn't take any effect until then.
- collinz1_17223NimbostratusIt appears that if i reduce the TCP::collect value, i get connected. However i only get connected if i set the value to 19 or below:
TCP::collect 19
Which is fine as far as connecting goes, however i guess this means that the irule is only collecting 19 bytes of data, which isn't enough to find my search string.
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