curl-users
Re: Bug or not ?
Date: Thu, 25 Jun 2009 14:16:53 +0200 (CEST)
On Thu, 25 Jun 2009, Olivier Rosello wrote:
> Why when I do :
> curl http://www.myipv6.org/
>
> The page say "You are connected thru an ipv4, your ip is 82.246.88.xx" (in
> French).
>
> To use ipv6 with curl I must do :
> curl -ipv6 http://www.myipv6.org/
>
> (The page says the same as with Firefox)
>
> When both are available, Curl should use ipv6 by default ?
curl uses getaddrinfo() to resolve names when built IPv6-enabled (if c-ares
wasn't specified at build time) and that returns the addresses in an order you
decide with the /etc/gai.conf file (on Linux). curl will simply create the
socket using the IP version that matches the address it will use. In your
case, getaddrinfo() clearly returns IPv4 addresses before IPv6 ones.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-06-25