Forum Discussion
Fabio_Sozzi_308
Nov 30, 2010Nimbostratus
Manipulates SSL payload for 2 Packets inside same session
Hi,
i've a problem with a creation of an iRule.
I have a session TCP and i need to manipulate the first two packets of the session. The packets NOT contain a Layer 7(HTTP,DNS,Ecc..) pa...
spark_86682
Jan 13, 2011Historic F5 Account
Sorry for taking so long to get back to this, but I've only just now been able to set this up to make sure that this works as I expected.
I think your problem can be solved simply by doing an SSL::release followed immediately by a second SSL::collect to capture the second data packet. Like so:
when CLIENTSSL_HANDSHAKE {
log local0. "Collecting..."
SSL::collect
set flag 0
}
when CLIENTSSL_DATA {
log local0. "Got [SSL::payload length] bytes plaintext"
Release first set of data to connect to server
SSL::release
if { $flag == 0 } {
Collect second set of data
SSL::collect
set flag 1
}
}
when SERVER_CONNECTED {
log local0. "Connected to server"
}
This works for me: I send one group of plaintext, the server gets connected to, and I can see the second group of plaintext in CLIENTSSL_DATA.
The reason this works is that SSL::release (and TCP::release) release their held data immediately, in this case causing the server connection/LB decision to happen. Note that HTTP::release is special and different, and it does *not* (in all current versions of BIG-IP) release its data immediately, it waits until the current event is complete.
Hope this helps!
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