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: process packets from different sources before handshake confirmed #2463

Merged
merged 2 commits into from
Feb 1, 2025

Conversation

camshaft
Copy link
Contributor

Description of changes:

This change fixes an issue where clients may (unknowingly) rebind ports/IPs mid handshake and not be able to complete the handshake due to the server dropping packets with reason ConnectionMigrationDuringHandshake. This behavior is less than desirable, since clients don't have control over their source IP/port. I also couldn't find any requirements in the RFC that stated that we couldn't process these packets. It only states that we can't initiate the migration flow before the handshake is confirmed.

Instead, we will process the packet as if it was received on the active path. Keep in mind that as before, until the handshake is confirmed we won't initiate any PATH_CHALLENGE frames and we won't create a new paths for the new remote address. But if the client is still able to reach the server and wrap the handshake up then we should try our best to make that happen.

This ultimately means that the ConnectionMigrationDuringHandshake reason will no longer be emitted.

Testing:

I updated the connection migration and path manager tests that were asserting this behavior to reflect the new expectation.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft requested a review from maddeleine January 31, 2025 22:08
@camshaft camshaft force-pushed the camshaft/cm-handshake-confirmed branch from 2d8d0f4 to 7e11553 Compare January 31, 2025 22:14
@camshaft camshaft marked this pull request as ready for review January 31, 2025 22:14
@camshaft camshaft requested a review from maddeleine February 1, 2025 00:47
@camshaft camshaft merged commit 82dd0b5 into main Feb 1, 2025
129 checks passed
@camshaft camshaft deleted the camshaft/cm-handshake-confirmed branch February 1, 2025 01:22
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