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

Ignore out of order packts during UDP connection in Reverse Mode #1260

Merged

Conversation

davidBar-On
Copy link
Contributor

  • Version of iperf3 (or development branch, such as master or
    3.1-STABLE) to which this pull request applies:

Latest 3.10+

  • Issues fixed (if any):

#1123, #1212 and probably #914, #1182

  • Brief description of code changes (suitable for use as a commit message):

Based on the analysis done by @aahoward in #1123. In UDP Reverse mode, the server starts sending the UDP packets immediately after sending the Connect response. Sometimes, before network packets reordering, the first UDP packet arrives to the client before the Connection response. In this case the client wrongly handles the first packet as the connection response.

The proposed solution is that the client will wait until receiving the connect response. Current implementation is that the client allows one packet out of order (hardcoded as it seems that the chance that two packets will arrive before the connection response is minimal). It is also assumed that the first packets does not include the 4 bytes connection response static value in a 4 bytes alignment offset.

Note that based on a suggestion in a previous issue (I couldn't find it now) I changed the connection and response 4 bytes messages values to textual value, to allow easier Wireshark, etc. readability.

Copy link
Contributor

@bmah888 bmah888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I did a little quick testing, and it seems good so far, aside from the two comments I had about backward compatibility. I'm going to try to study the various issues this PR is supposed to fix to be sure I understand them.

src/iperf_udp.c Outdated Show resolved Hide resolved
src/iperf_udp.c Outdated Show resolved Hide resolved
@bmah888
Copy link
Contributor

bmah888 commented Feb 14, 2022

Looks great, thanks again for working on this!

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