Skip to content

lib/connections: Resolve IPv6 for quic6:// peers#7810

Merged
acolomb merged 1 commit intosyncthing:mainfrom
yan12125:fix-quic6
Jul 5, 2021
Merged

lib/connections: Resolve IPv6 for quic6:// peers#7810
acolomb merged 1 commit intosyncthing:mainfrom
yan12125:fix-quic6

Conversation

@yan12125
Copy link
Copy Markdown
Contributor

@yan12125 yan12125 commented Jul 5, 2021

Purpose

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.

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.

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.
Copy link
Copy Markdown
Member

@acolomb acolomb left a comment

Choose a reason for hiding this comment

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

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?

@yan12125
Copy link
Copy Markdown
Contributor Author

yan12125 commented Jul 5, 2021

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

Copy link
Copy Markdown
Member

@AudriusButkevicius AudriusButkevicius left a comment

Choose a reason for hiding this comment

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

lgtm

@acolomb acolomb self-requested a review July 5, 2021 11:18
@acolomb acolomb merged commit 11c57b9 into syncthing:main Jul 5, 2021
@yan12125 yan12125 deleted the fix-quic6 branch July 5, 2021 11:26
@yan12125
Copy link
Copy Markdown
Contributor Author

yan12125 commented Jul 5, 2021

Thanks for reviewing!

@calmh calmh added this to the v1.18.1 milestone Jul 13, 2021
@calmh calmh added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Aug 11, 2022
@syncthing syncthing locked and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syncthing attemps IPv4 addresses for quic6:// peers

4 participants