Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 2004 12:05:52 +0300
From:      Jan Mikael Melen <Jan.Melen@iki.fi>
To:        freebsd-hackers@freebsd.org
Subject:   getaddrinfo
Message-ID:  <200407081205.52677.Jan.Melen@iki.fi>

next in thread | raw e-mail | index | archive | help
Hi,

I'm having problems with getaddrinfo call. 

When resolving multiple IPv6 addresses that are specified in /etc/hosts, the 
response from getaddrinfo call contains only the first address not the whole 
list. If I'll configure the corresponding addresses in to DNS I'll get all 
the addresses as a response.

Here is an example:

Resolving from /etc/hosts
/etc/hosts:
1ffe::10 oneffeten
1ffe:1000:0001:10 oneffeten
1ffe:1000:0002:10 oneffeten

# ./test_libc -h oneffeten -6 -a
Searching for oneffeten... (using getaddrinfo)
1ffe::10
done
#

Resolving from DNS:
DNS records:
oneffeten       IN      AAAA    1ffe:1000:1::10
                IN      AAAA    1ffe:1000:2::10
                IN      AAAA    1ffe::10

# ./test_libc -h oneffeten.domain.com -6 -a
Searching for oneffeten.domain.com... (using getaddrinfo)
1ffe:1000:1::10
1ffe:1000:2::10
1ffe::10
done
#

Does anyone have any good pointers what am I doing wrong or what might be 
causing that getaddrinfo doesn't return all known addresses of the host?

Is there some limitation that host can have only one address in /etc/hosts?

  regards,
	Jan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407081205.52677.Jan.Melen>