quic: refresh session path addresses - #65733
Open
manNomi wants to merge 2 commits into
Open
Conversation
Signed-off-by: manNomi <hanmw110@naver.com>
Use ngtcp2's current path as the address source and keep mutable address state private so cached path objects remain safe to freeze. Signed-off-by: manNomi <hanmw110@naver.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65733 +/- ##
==========================================
- Coverage 90.05% 90.05% -0.01%
==========================================
Files 755 755
Lines 257100 257128 +28
Branches 48730 48737 +7
==========================================
+ Hits 231544 231567 +23
+ Misses 16675 16650 -25
- Partials 8881 8911 +30
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
QuicSession#pathcurrently caches theSocketAddressinstances created on first access. When a client follows a server's preferred address, ngtcp2 updates the connection path but latersession.pathreads continue to expose the original addresses.Read the current path from
ngtcp2_conn_get_path2()and refresh private address state wheneversession.pathis accessed. The public path object remains cached and itslocalandremoteproperties are read-only, so freezing the returned object does not prevent later internal refreshes.Extend the preferred-address migration test to verify the initial and migrated paths, preserve the cached object identity, and cover a frozen path object. Document the cache and refresh behavior.