lib/connections: Resolve IPv6 for quic6:// peers#7810
Merged
acolomb merged 1 commit intosyncthing:mainfrom Jul 5, 2021
yan12125:fix-quic6
Merged
lib/connections: Resolve IPv6 for quic6:// peers#7810acolomb merged 1 commit intosyncthing:mainfrom yan12125:fix-quic6
acolomb merged 1 commit intosyncthing:mainfrom
yan12125:fix-quic6
Conversation
Before this patch, IPv4-compatible addresses (::ffff:aaa.bbb.ccc.ddd) may be used if a quic6://some.domain:port is specified and both IPv4 and IPv6 addresses exist for that domain name.
acolomb
reviewed
Jul 5, 2021
Member
There was a problem hiding this comment.
I don't know how the Go library handles it in the rest of the code, but at least here we should treat the search string case-insensitive. URI parsers must accept any case variation on the scheme part. Or is it already normalized in the uri data structure?
Contributor
Author
|
I didn't find documentation about it. From Go source codes, the scheme is indeed normalized to lower cases: https://github.com/golang/go/blob/go1.16.5/src/net/url/url.go#L531 |
acolomb
approved these changes
Jul 5, 2021
Contributor
Author
|
Thanks for reviewing! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Purpose
Before this patch, IPv4-compatible addresses (
::ffff:aaa.bbb.ccc.ddd)may be used if a
quic6://some.domain:portis specified and both IPv4 andIPv6 addresses exist for that domain name.
Fixes #7809
Testing
Follow "steps to reproduce the problem" as described in #7809, and check if I got connections with normal IPv6 addresses.
Screenshots N/A
Documentation N/A
Authorship
Your name and email will be added automatically to the AUTHORS file
based on the commit metadata.