getaddrinfo
Jan Mikael Melen
Jan.Melen at iki.fi
Thu Jul 8 02:05:59 PDT 2004
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
More information about the freebsd-hackers
mailing list