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

Add ability to change tcp SEQ/ACK numbers #425

Conversation

mariodsantana
Copy link

For playing around on networks that drop or log repeated seq/ack numbers.

@fklassen
Copy link
Member

Thanks for the PR.

It appears that Travis CI had a build failure. Looking at the above logs, it appears that sudo make test failed.

@mariodsantana
Copy link
Author

Closing this pull request until I can figure out why make test is failing.

@mariodsantana
Copy link
Author

@fklassen - boy, that should have been obvious. This patch generates a random shift to the SEQ/ACK numbers in the input packets, so the test output will not be the same across multiple test runs. The test harness seems to require that multiple runs with the same args on the same input will create the same output - with this patch, this will happen approximately once every 2^32 test runs on average. ;)

Let me know how you'd like to proceed. I don't have time in the next few weeks to rework the test harness here, but I'd like to give back if feasible.

@mariodsantana mariodsantana reopened this Nov 19, 2017
@fklassen
Copy link
Member

I usually use un-seeded random numbers for my tests, and make sure to use the random number generator included in the source tree. This ensures tests are consistent across all platforms including Big-Endian machines. It is important to get tests right because we are now in the Debian/Ubuntu tree which will reject versions that fail tests on any platform.

If you don't have time to look at this, I plan to take some vacation time at the end of the year. I use this time to catch up on Tcpreplay bugs and features. I can have a closer look then. I can also test on multiple platforms to make sure nothing breaks.

@mariodsantana
Copy link
Author

Understood about the testing. I do use the normal rand() function, since the quality of the randomness isn't important. I'll see if I can clean it up before you get a chance to look at it during the holidays.

Thanks!

fklassen added a commit that referenced this pull request Jan 21, 2018
@fklassen fklassen changed the base branch from master to Enhancement_#425_edit_tcp_seq-ack_numbers January 21, 2018 22:03
@fklassen fklassen changed the base branch from Enhancement_#425_edit_tcp_seq-ack_numbers to Enhancement_#425_edit_tcp_seq-ack_numbers_staging January 21, 2018 22:13
@fklassen fklassen merged commit 204d8ef into appneta:Enhancement_#425_edit_tcp_seq-ack_numbers_staging Jan 21, 2018
fklassen added a commit that referenced this pull request Jan 21, 2018
fklassen added a commit that referenced this pull request Jan 21, 2018
@fklassen
Copy link
Member

@mariodsantana I merged into a new PR #449 so I can test and prep for 4.3 release. Can you look into 2 bugs? #450 and #451

Thanks, Fred.

fklassen added a commit that referenced this pull request Jan 22, 2018
fklassen added a commit that referenced this pull request Oct 23, 2018
…k_numbers_staging

Enhancement #425 edit tcp seq ack numbers staging
@fklassen
Copy link
Member

merged to 4.3 beta2 in #449

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

Successfully merging this pull request may close these issues.

2 participants