Package: libcurl3 Version: 7.18.2-6 Severity: normal Curl / libc-ares doesn't read IPv4 addresses from /etc/hosts.
prompt:~$ curl http://localhost/ curl: (6) Could not resolve host: localhost (Domain name not found) prompt:~$ curl http://ip6-localhost/ <html><body><h1>It works!</h1></body></html> I'm not sure if this should be logged against libcurl3 or libc-ares2. libcurl3 asks specifically for an IPv6 address, and it seems that libc-ares2 won't return IPv4 addresses for file lookups when IPv6 is requested. But for hosts found via DNS instead of /etc/hosts, only a single call to ares_gethostbyname (..., family=AF_INET6, ...) is needed to get an IPv4 address. I've had experimental versions of libc-ares on my PC, but have done a cleanup to make sure that I'm using the official versions. If you can't replicate this immediately, send it back and I'll check again. My /etc/nsswitch.conf is below - I've set it to not use lwres while debugging. Obscure use case broken by this: "apt-file update", when /etc/apt.sources lists a [debtorrent] caching proxy running on localhost. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (990, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25 (PREEMPT) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libcurl3 depends on: ii ca-certificates 20080617 Common CA certificates ii libc-ares2 1.5.2-4 library for asyncronous name resol ii libc6 2.7-12 GNU C Library: Shared libraries ii libidn11 1.9-1 GNU libidn library, implementation ii libkrb53 1.6.dfsg.4~beta1-3 MIT Kerberos runtime libraries ii libldap-2.4-2 2.4.10-2 OpenLDAP libraries ii libssh2-1 0.18-1 SSH2 client-side library ii libssl0.9.8 0.9.8g-10.1 SSL shared libraries ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime libcurl3 recommends no packages. -- no debconf information -- /etc/hosts: 127.0.0.1 localhost 127.0.1.1 tsunami.localdomain tsunami 172.18.166.2 nas #192.168.1.18 tsunami 192.168.0.1 sashimi #<removed from bug report, was commented out in the original> #<removed from bug report, was commented out in the original> # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts # Why is libcurl not using lwresd? 81.161.192.4 updates.themanaworld.org -- /etc/nsswitch.conf: # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file. passwd: compat group: compat shadow: compat # DNS is in there to bump libc-ares2 hosts: files dns #hosts: files lwres dns #hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]