Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week 14: TCP Replay is finished #4

Open
mrdude opened this issue Nov 29, 2016 · 1 comment
Open

Week 14: TCP Replay is finished #4

mrdude opened this issue Nov 29, 2016 · 1 comment

Comments

@mrdude
Copy link
Contributor

mrdude commented Nov 29, 2016

@twood02
As of commit 0b5a7b1, TCP replay works.

As usual, the problems were caused by a handful of subtle bugs:

  1. When Athena responds to a SYN packet, it needs to set tcp->recv_ack to sequence number of SYN packet + 1. I didn't take endianness into account, so adding 1 to a big-endian number on a little endian system gave me the wrong ack number.
  2. When Athena receives a SYN and ACK during the handshake, it needs to save copies of those packets. I wasn't copying the packets correctly, so when Athena would replay the handshake for the server, it would send empty packets.
  3. The state machine in ct_update_connection() skipped the state that would complete the server's TCP handshake, so connections would never actually start sending data.

Now that I have a working TCP replay implementation, I'm going to move the relevant changes to my dev-tcpreplay branch, and start load testing with Vegeta.

@twood02
Copy link
Contributor

twood02 commented Nov 30, 2016

ok, glad it is working. If you have questions about the demo let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants