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: QUIC/Webtransport Transports now will prefer their owned listeners for dialing out #2936

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

MarcoPolo
Copy link
Collaborator

@MarcoPolo MarcoPolo commented Aug 22, 2024

Fixes #2913

The issue is presented in #2913 (comment).

The fix here introduces "associations" to refcountedTransports. a libp2p transport can associate itself with the transport used for listening, and then prefer to use that for dialing by passing itself as the association.

p2p/transport/webtransport/listener.go Outdated Show resolved Hide resolved
p2p/transport/webtransport/transport.go Outdated Show resolved Hide resolved
p2p/transport/quic/transport.go Outdated Show resolved Hide resolved
libp2p_test.go Outdated Show resolved Hide resolved
@MarcoPolo
Copy link
Collaborator Author

I think there's an issue here where we don't have any logic to pick the interface that can actually route the packet.

@MarcoPolo MarcoPolo force-pushed the marco/dial-from-your-own-listener branch from c96307c to 7566f9f Compare August 24, 2024 05:02
@MarcoPolo
Copy link
Collaborator Author

I've changed this PR completely. I think it's a little cleaner now. Minimal changes to the transports, and leveraging existing logic in the quicreuse package.

Another review please @sukunrt ?

@MarcoPolo MarcoPolo requested a review from sukunrt August 24, 2024 05:03
@2color 2color mentioned this pull request Aug 26, 2024
32 tasks
Copy link
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

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

This is definitely nicer. Thanks!

@sukunrt sukunrt force-pushed the marco/dial-from-your-own-listener branch from 7566f9f to 0fde4dc Compare August 28, 2024 05:50
@lidel lidel mentioned this pull request Aug 28, 2024
34 tasks
@MarcoPolo MarcoPolo merged commit 65bc28b into master Aug 28, 2024
11 checks passed
sukunrt pushed a commit that referenced this pull request Aug 30, 2024
MarcoPolo added a commit that referenced this pull request Sep 4, 2024
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.

QUIC/WebTransport Transport sometimes uses the wrong socket to dial out.
2 participants