gethostbyname does not try the next nameserver in resolv.conf

Mandeep Ahuja ahuja at aksysnetworks.com
Thu Mar 18 17:59:22 UTC 2010


Hi, I am using uClibc 0.9.30.1 along with Kernel 2.6 and busybox 1.2.2.1

My resolv.conf had two nameserver's listed.

cat /etc/resolv.conf
nameserver 64.59.135.291
nameserver 64.59.135.145

When I use "gethostbyname" it fails. Looking on the wire the 
64.59.135.291 DNS Server was not responding. But I would have expected a 
second query to the other nameserver 64.59.135.145, it didn't happen.

Then I used "nslookup" command in the busybox and it succeeded as it 
tried the second server after timing out on the first one. The busybox 
is using its own "xgethostbyname" function which I was not able to use 
in my application

Is there a bug in the uClibc?

Please help

Regards
Mandeep



More information about the uClibc mailing list