On 6/6/07, Davi Arnaut <[EMAIL PROTECTED]> wrote:
Joe Orton wrote:
> On Wed, Jun 06, 2007 at 06:06:44PM +0300, Lucian Adrian Grijincu wrote:
>> $>./test ::1 ssh
>> ./test: getaddrinfo: Address family for hostname not supported
>>
>> $> telnet ::1 ssh
>> Trying ::1...
>> Connected to ::1.
>
> That makes little sense.  I presume you do in fact have the "ipv6"
> module loaded (lsmod | grep ipv6)?  What version of glibc is this?  Does
> it make any difference if you set ai_flags to 0 in your test program?
>



[EMAIL PROTECTED]:~$ lsmod | grep ipv6
ipv6                  268960  12

I guess 2.5 :)
Ubuntu reports it as 2.5-0ubuntu14

[EMAIL PROTECTED]:~$ ls -al /lib/libc.so.6
lrwxrwxrwx 1 root root 11 2007-05-18 01:12 /lib/libc.so.6 -> libc-2.5.so

I think that telnet could see that "::1" is the IPv6 loopback string
and replace it with "127.0.0.1" if it wanted. Haven' looked at the
code, just why this behaviour may be possible.



In case anyone wanna try.. test attached.

This is the output:
getaddrinfo AF_UNSPEC/SOCK_STREAM/AI_ADDRCONFIG failed
so, yes:     hints.ai_flags = AI_ADDRCONFIG; makes getaddrinfo fail.

--
Lucian Adrian Grijincu

Reply via email to