Operating System - HP-UX
1831726 Members
4347 Online
110029 Solutions
New Discussion

getaddrinfo fails to resolve domains from /etc/hosts

 
Midhun Chandran
Occasional Contributor

getaddrinfo fails to resolve domains from /etc/hosts

On HP-UX 11i, I am facing problems using getaddrinfo to resolve domains specified in /etc/hosts. The attached is a test program which reproduces the same. (gcc -D_XOPEN_SOURCE_EXTENDED resolve_host.c)

What I have observed is that the test program works for all domains resolving from DNS. When I try domains that are specified in /etc/hosts, it fails for all domains except for the last one.

./resolve_host files.hpdomain1.com
Failed to resolve IP address for files.hpdomain1.com
Error: host nor service provided, or not known

I have installed the following patches but the problem still occurs.
PHCO_25569
PHNE_27796
PHCO_28605
PHNE_30068

Is there any patch available which fixes this problem ?
1 REPLY 1
Midhun Chandran
Occasional Contributor

Re: getaddrinfo fails to resolve domains from /etc/hosts

PHCO_30030 fixed the problem.

-Midhun