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

Curl does not support ipv6 #370

Closed
Porges opened this issue Sep 9, 2015 · 16 comments · Fixed by msys2/MINGW-packages#786
Closed

Curl does not support ipv6 #370

Porges opened this issue Sep 9, 2015 · 16 comments · Fixed by msys2/MINGW-packages#786

Comments

@Porges
Copy link

Porges commented Sep 9, 2015

With 2.5.1, curl --version prints:

curl 7.44.0 (x86_64-w64-mingw32) libcurl/7.44.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.32 libssh2/1.6.0 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: IDN Largefile SSPI Kerberos SPNEGO NTLM SSL libz TLS-SRP

With the older 1.9.5 version, curl prints:

curl 7.41.0 (i386-pc-win32) libcurl/7.41.0 OpenSSL/0.9.8zf zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz

Note "IPv6" in Features line.

@dscho
Copy link
Member

dscho commented Sep 10, 2015

Do you actually have an IPv6-only host to test against?

@Porges
Copy link
Author

Porges commented Sep 10, 2015

Running curl.exe against ipv6.google.com fails, but I can load it in my browser.

I bumped into this because I can only access our git repository over IPv6, and 2.5.x cannot connect. If I run with GIT_CURL_VERBOSE=1 I can see it try to resolve an IPv4 address. I had to downgrade back to 1.9.5.x.

@dscho
Copy link
Member

dscho commented Sep 10, 2015

Running curl.exe against ipv6.google.com fails

That is the MCVE I was looking for! Thanks!

@ytimenkov
Copy link

Have same issue with git version 2.5.2.windows.2.

is it really just a missing flag when building CURL? It worked before and still works in Cygwin version.

@dscho
Copy link
Member

dscho commented Sep 17, 2015

Running curl.exe against ipv6.google.com fails

That is the MCVE I was looking for!

Hmpf.

$ ping ipv6.google.com
Ping request could not find host ipv6.google.com. Please check the name and try again.

This is not the MCVE I was looking for.

not-the-mcve

@dscho
Copy link
Member

dscho commented Sep 17, 2015

is it really just a missing flag when building CURL?

Possibly. If you have time, please dig deeper. The curl version we use is built using this script (you can rebuild it by following these instructions).

@maoueh
Copy link

maoueh commented Sep 17, 2015

It seems the right url is http://ipv6test.google.com/.

Also, it appears the the msys version of curl is compiled with IPv6 support but not the mingw one:

movachon@mendes ~ (machine-work)
$ /usr/bin/curl.exe --version
curl 7.44.0 (x86_64-pc-msys) libcurl/7.43.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.31 libssh2/1.6.0
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: Debug IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets Metalink

movachon@mendes ~ (machine-work)
$ /mingw64/bin/curl.exe --version
curl 7.44.0 (x86_64-w64-mingw32) libcurl/7.44.0 OpenSSL/1.0.2c zlib/1.2.8 libidn/1.30 libssh2/1.6.0 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: IDN Largefile SSPI Kerberos SPNEGO NTLM SSL libz TLS-SRP

Not sure why though.

@dscho
Copy link
Member

dscho commented Sep 17, 2015

it appears the the msys version of curl is compiled with IPv6 support but not the mingw one:

Correct. But we knew already that the MinGW version is compiled without IPv6 support. That's not a new information...

@dscho
Copy link
Member

dscho commented Sep 17, 2015

BTW no need to add more comments here, I am in the process of fixing this myself. Note: I would have really appreciated somebody motivated to step in. Would be nice to spend less than 14 hours a day on other people's problems, for a change. Oh well... back to patching ./configure.

@Porges
Copy link
Author

Porges commented Sep 17, 2015

Hmpf.

$ ping ipv6.google.com
Ping request could not find host ipv6.google.com. Please check the name and try again.
This is not the MCVE I was looking for.

ipv6.google.com does work for me:

>ping ipv6.google.com

Pinging ipv6.l.google.com [2800:3f0:4003:800::1005] with 32 bytes of data:
Reply from 2800:3f0:4003:800::1005: time=296ms
Reply from 2800:3f0:4003:800::1005: time=296ms

Ping statistics for 2800:3f0:4003:800::1005:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 296ms, Maximum = 296ms, Average = 296ms
Control-C
^C

Possibly your IPv6 was not fully functional at the time? ipv6.google.com is inaccessible over IPv4 (only has an AAAA record).

@dscho
Copy link
Member

dscho commented Sep 17, 2015

Yep, apparently my ISP does not let me connect to IPv6-only hosts. I have a curl.exe now that times out (instead of erroring out) when called via

curl 'http://[2800:3f0:4003:800::1005]/'

So I call that progress.

@dscho
Copy link
Member

dscho commented Sep 17, 2015

Okay, here is your chance to help me, everybody: download the Pacman package for your SDK from https://github.com/dscho/MINGW-packages/releases/tag/tmp-ipv6-curl, install it with pacman -U <file> and test. Since this updates the .dll, Git should magically start working with HTTP(S) via IPv6.

@dscho
Copy link
Member

dscho commented Sep 18, 2015

@ytimenkov was nice enough to test and reported success. Thanks!

For lurkers: the fix was merged upstream and the next mingw-w64-curl release will be uploaded soon.

@Porges
Copy link
Author

Porges commented Sep 23, 2015

Thanks! Confirmed 2.5.3 solves my problems 👍

@dscho
Copy link
Member

dscho commented Sep 23, 2015

@Porges thanks for testing.

@aefimov
Copy link

aefimov commented Sep 24, 2015

Also tested on win 2012 server / 64bit, all works fine! Thanks!

jeffhostetler pushed a commit to jeffhostetler/git that referenced this issue Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants