Forum Discussion
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..) payload but only simple binary payload(a sequence of ASCII code).
My problem is that after the first packet, which can be manipulated with event CLIENT_ACCEPTED and CLIENT_DATA (and the method TCP::collect), i can't find a event that allows me to modify the next TCP payload packet.
if you can help I have set the HTTP profile. So the only events Layer 7 can be used are those HTTP.
There is an event that satisfies my request?
Thanks in advance for any response.
Kind Regards,
Fabio.
16 Replies
- hoolio
Cirrostratus
Hi Fabio,
I'll need to test this to see if I can figure something out. I'm not sure how quickly I can set something up though. I'll let you know as soon as I can though.
Aaron - Fabio_Sozzi_308
Nimbostratus
Thanks. I hope that you respond quicky.
Thank you.
Regard.
Fabio - Fabio_Sozzi_308
Nimbostratus
Thanks. I hope that you respond quicky.
Thank you.
Regard.
Fabio - Fabio_Sozzi_308
Nimbostratus
Thanks. I hope that you respond quicky.
Thank you.
Regard.
Fabio - Fabio_Sozzi_308
Nimbostratus
Any News???
Regard.
Fabio - spark_86682Historic F5 AccountSorry 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
* 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