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(server): filter out /quic in favor of /quic-v1 #4467

Merged
merged 8 commits into from
Sep 12, 2023

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Sep 7, 2023

Description

Configuration files generated by Kubo <= v0.22 list both /quic and /quic-v1 listen addresses with the same UDP port. Given that we enable draft-29, the two addresses are treated the same by rust-libp2p's QUIC implementation. Though calling listen_on with both results in an "Address already in use" error by the OS on the second call. To prevent this from happening filter out /quic addresses in favor of /quic-v1.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Configuration files generated by Kubo <= v0.22 list both `/quic` and `/quic-v1` listen
addresses with the same UDP port. Given that we enable draft-29, the two addresses are
treated the same by rust-libp2p's QUIC implementation. Though calling `listen_on` with
both results in an "Address already in use" error by the OS on the second call. To
prevent this from happening filter out `/quic` addresses in favor of `/quic-v1`.
misc/server/src/main.rs Outdated Show resolved Hide resolved
@thomaseizinger thomaseizinger requested review from mcamou and removed request for thomaseizinger September 11, 2023 02:50
@thomaseizinger
Copy link
Contributor

@mcamou This disables draft-29 support from rust-libp2p-server which means for the /quic addresses in the config, we will log a warning that we can't listen on it anymore. Is that okay? Given that we will deprecate draft-29 anyway, I figured this is a much simpler solution.

@mcamou
Copy link
Contributor

mcamou commented Sep 11, 2023

@mcamou This disables draft-29 support from rust-libp2p-server which means for the /quic addresses in the config, we will log a warning that we can't listen on it anymore. Is that okay? Given that we will deprecate draft-29 anyway, I figured this is a much simpler solution.

@thomaseizinger sounds good! I think this is what we need.

@mergify

This comment was marked as resolved.

@mergify
Copy link

mergify bot commented Sep 11, 2023

This pull request has merge conflicts. Could you please resolve them @mxinden? 🙏

@mergify mergify bot merged commit 0e64d71 into libp2p:master Sep 12, 2023
67 of 68 checks passed
Copy link
Member Author

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thank you. I find this an easier solution than the one I initially proposed.

@thomaseizinger
Copy link
Contributor

Thank you. I find this an easier solution than the one I initially proposed.

I forgot to update the PR description though so the commit message is all wrong :/

mxinden added a commit to mxinden/rust-libp2p that referenced this pull request Oct 10, 2023
Support for QUIC draft 29 was removed with libp2p#4467.

libp2p#4120 reintroduced it as a faulty merge.

This commit removes it again.
mergify bot pushed a commit that referenced this pull request Oct 10, 2023
Support for QUIC draft 29 was removed with #4467.

#4120 reintroduced it as a faulty merge.

This commit removes it again.

Pull-Request: #4622.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants