fix(quic): add support for reusing an existing socket for local dialing#4304
Merged
mergify[bot] merged 10 commits intolibp2p:masterfrom Aug 11, 2023
Merged
fix(quic): add support for reusing an existing socket for local dialing#4304mergify[bot] merged 10 commits intolibp2p:masterfrom
mergify[bot] merged 10 commits intolibp2p:masterfrom
Conversation
mxinden
reviewed
Aug 10, 2023
Member
There was a problem hiding this comment.
Neat! Thank you @arsenron for the work.
Would you mind adding a unit test as well? This should be relatively straight forward. Given two nodes A and B:
- Have A listen on
0.0.0.0:0. - Given the wildcard port (
:0) store the concrete port chosen by the OS across all interfaces. - Have B listen on
127.0.0.1:0. - Have A dial B.
- Expect the source port of A at B to be the port stored in (2), i.e. to be A's listen port.
Contributor
|
This pull request has merge conflicts. Could you please resolve them @arsenron? 🙏 |
ddb17c6 to
aee6ddb
Compare
Contributor
Author
Done. |
mxinden
reviewed
Aug 10, 2023
Member
mxinden
left a comment
There was a problem hiding this comment.
Wow, that was fast. Thank you! Two suggestions.
mxinden
reviewed
Aug 11, 2023
Member
mxinden
left a comment
There was a problem hiding this comment.
Thank you for adjusting the test.
Contributor
Author
|
@mxinden Rewrote using a |
Member
4 tasks
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
Tracked in #4259. Now if a listener supports loopback interfaces, when a remote address is also a loopback address, we reuse an existing listener.
Notes & open questions
Change checklist