[uClibc] DNS server is always get in /etc/resolv.conf

magicfox magicfox at magic.fr
Tue Nov 23 17:43:06 UTC 2004


Hi,

I have a little pb.with uClibc 0.9.26

Normally we can specify a DNS server after a call to res_init() and 
define the DNS server in the global _res.nsaddr_list[0].sin_addr.

But uClibc/libc/inet/resolv.c
int __open_nameservers() function get DNS servers from /etc/resolv.conf 
so the functions gethostbyaddr() or gethostbyname() use this in place of 
global _res structure.

This behavior break the command #nslookup name server in busybox 1.0 
with uClibc.
Compiling busybox with glibc show the usage of the correct specified server.

Any thoughts or workaround ?

magicfox



More information about the uClibc mailing list