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

Fix a bug that causes tcp/receive/duplicate|out_of_order not working #267

Merged
merged 15 commits into from
Jan 6, 2022

Conversation

WUMUXIAN
Copy link
Contributor

@WUMUXIAN WUMUXIAN commented Jan 6, 2022

Problem

tcp/receive/duplicate and tcp/receive/out_of_order metrics count are always 0.
Even when there are actually duplicated or out of order packets in testing.

Solution

This is caused by comparing u32 against 0 in the code, and the conditions are never met.
The fix is to compare them properly as signed integer.

Result

In testing, now tcp/receive/duplicate and tcp/receive/out_of_order work as expected.

Copy link
Contributor

@rittme rittme left a comment

Choose a reason for hiding this comment

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

Thank you for finding and fixing this!

@brayniac brayniac merged commit 7e360a8 into twitter:master Jan 6, 2022
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.

3 participants