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

ackhandler: fix ECN mangling detection when packets are lost #4089

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

marten-seemann
Copy link
Member

@marten-seemann marten-seemann commented Sep 17, 2023

Some of the 10 testing packets are might be lost, while others might be CE-marked. We need to detect mangling if all testing packets are either lost are CE-marked.

Depends on #4088.

@codecov
Copy link

codecov bot commented Sep 17, 2023

Codecov Report

Merging #4089 (a7afb9f) into master (c12f425) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4089      +/-   ##
==========================================
- Coverage   83.71%   83.70%   -0.01%     
==========================================
  Files         150      150              
  Lines       15384    15394      +10     
==========================================
+ Hits        12878    12885       +7     
- Misses       2006     2008       +2     
- Partials      500      501       +1     
Files Changed Coverage Δ
internal/ackhandler/ecn.go 85.80% <100.00%> (+0.86%) ⬆️

... and 1 file with indirect coverage changes

@marten-seemann marten-seemann added this to the v0.39 milestone Sep 17, 2023
@@ -259,6 +261,18 @@ func (e *ecnTracker) HandleNewlyAcked(packets []*packet, ect0, ect1, ecnce int64
return e.state == ecnStateCapable && newECNCE > 0
}

// detectMangling fails ECN validation if all testing packets are lost or CE-marked.
func (e *ecnTracker) detectMangling() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: detectMangling reads like it should return a bool. But I also don't have a good suggestion. The best I can think of is failIfMangled

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense, I'll take it.

Some of the 10 testing packets are might be lost, while others might be
CE-marked. We need to detect mangling if all testing packets are either
lost are CE-marked.
@marten-seemann marten-seemann changed the base branch from ecn-only-fail-validation-if-10-testing-packets-lost to master September 18, 2023 04:55
@marten-seemann marten-seemann merged commit 4a04618 into master Sep 18, 2023
17 checks passed
@marten-seemann marten-seemann deleted the better-ecn-mangling-detection branch September 24, 2023 11:42
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.

None yet

2 participants