fix connecting to ipv6 using quinn backend#82
Merged
kixelated merged 3 commits intomoq-dev:mainfrom Jun 2, 2025
Merged
Conversation
Contributor
Author
|
thanks for the fixes as for the versions, for future reference: i should keep them the same for PRs as they will be automatically incremented? |
Collaborator
They get automatically incremented by release-plz which also makes a (crude) changelog. Bumping them would have worked too. |
Merged
This was referenced Feb 18, 2026
Merged
Merged
Merged
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.
currently it is not possible to connect to an Ipv6 address using quinn
the reason for this is the the Url crate converts the Ipv6 host enum variant to a string encompassed in
[]i.e.[::1]however during domain name resolution it is not recognized as an ipv6 due to the[]and instead tries to look it up as if it was a domain which of course fails.here is the code in Url that adds
[]they write they do this because of RFC 5952 A Recommendation for IPv6 Address Text Representation
that this causes problems is a known issue
here is the code in tokio that is called by this crate that handles name resolution and tries to parse the ipv6 and fails because of the
[]as it is unlikely that either tokio or Url will fix this representation incompatibility i would suggest that the appropriate solution is to never convert to str and then reparse and instead only do name resolution if we are not dealing with an IP
As the host string is also passed to the connect_with function i do not know if it is appropriate to keep the
[]so i am not changing that.