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
localhost resolves to IPv4 then IPv6 in unexpected order #11465
Labels
name lookup
DNS and related tech
Comments
I can also confirm without
with patch
|
bagder
added a commit
that referenced
this issue
Jul 19, 2023
Fixes #11465 Reported-by: Chilledheart on github
bch
pushed a commit
to bch/curl
that referenced
this issue
Jul 19, 2023
Fixes curl#11465 Reported-by: Chilledheart on github Closes curl#11466
Chilledheart
added a commit
to Chilledheart/yass
that referenced
this issue
Jul 22, 2023
After curl resolves localhost by itself, IPv4 address came first until recently. For most modern resolver, IPv6 address comes first. see more at: curl/curl#11465 and: https://daniel.haxx.se/blog/2021/05/31/curl-localhost-as-a-local-host/
Chilledheart
added a commit
to Chilledheart/yass
that referenced
this issue
Jul 22, 2023
After curl resolves localhost by itself, IPv4 address came first until recently. For most modern resolver, IPv6 address comes first. see more at: curl/curl#11465 and: https://daniel.haxx.se/blog/2021/05/31/curl-localhost-as-a-local-host/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following the thread in #11458. I can confirm the issue is irrelative to proxy setups.
I did this
I pick one VM from mine at IPv6-enabled public network for example.
(IPv6 addresses come at first)
(IPv4 addresses come at first)
I expected the following
See
curl/lib/hostip.c
Lines 557 to 588 in f2aac0d
the DNS response for localhost is manually crafted, so it is neither done by
getaddrinfo
nor affected by/etc/hosts
file.To be clear, for some usage of IPv6 localhost, it could be disabled manually by removing the line inside
/etc/hosts
(IPv6 addresses come at first)
curl/libcurl version
operating system
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: