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

Don't send client CONNECTION_CLOSE on 1-RTT before handshake completion. #4145

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Feb 19, 2024

Description

Fixes #4132.

Testing

Fixed tests so that they would detect the bug before the fix.

Documentation

No.

@rzikm rzikm requested a review from a team as a code owner February 19, 2024 16:19
@@ -885,13 +894,11 @@ QuicTestCustomServerCertificateValidation(
}
TEST_EQUAL(AcceptCert, Client.GetIsConnected());

if (AcceptCert) { // Server will be deleted on reject case, so can't validate.
Copy link
Member Author

@rzikm rzikm Feb 20, 2024

Choose a reason for hiding this comment

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

I don't see how the server would get deleted. The new connection instance is held by the unique_ptr above and neither the AutoDelete bit nor ShutdownEventCallback is set, so the connection should be valid until the unique_ptr goes out of scope.

Copy link
Member

Choose a reason for hiding this comment

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

I believe this was meant to handle a case where the listener could reject the connection, and then this pointer would never be set. That being said, I cannot see a path where that would happen in this test case (or the one below). And since the tests seem to pass just fine, I'm ok with these changes.

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.02%. Comparing base (86e08e5) to head (de3f2ef).
Report is 36 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4145       +/-   ##
===========================================
- Coverage   87.38%   65.02%   -22.36%     
===========================================
  Files          56       56               
  Lines       16984    15189     -1795     
===========================================
- Hits        14841     9877     -4964     
- Misses       2143     5312     +3169     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nibanks nibanks added the Area: Core Related to the shared, core protocol logic label Feb 23, 2024
@nibanks
Copy link
Member

nibanks commented Feb 23, 2024

@rzikim would it be possible to add (or modify) a test to validate #4132 is actually fixed?

@rzikm
Copy link
Member Author

rzikm commented Feb 23, 2024

@rzikim would it be possible to add (or modify) a test to validate #4132 is actually fixed?

That is handled by the tests modified in this PR, without the fix in packet_builder.c, the async/reject case would've failed. This was not detected before because the test did not wait for server shutdown notification which would've timed out.

@nibanks
Copy link
Member

nibanks commented Feb 23, 2024

@rzikim would it be possible to add (or modify) a test to validate #4132 is actually fixed?

That is handled by the tests modified in this PR, without the fix in packet_builder.c, the async/reject case would've failed. This was not detected before because the test did not wait for server shutdown notification which would've timed out.

Ah! I see. Ok, then let's ship it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Related to the shared, core protocol logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Certificate rejection via ConnectionCertificateValidationComplete leads to connection timeout.
2 participants