gethostbyname problem

Cuero Bugot cbugot at sierrawireless.com
Tue Oct 13 13:11:48 UTC 2009


Hi all,

We actually found the problem with gethostbyname on uClibc.
When we change the network interface, the /etc/resolv.conf is also and apparently the uClibc resolve code is not reloading the nameserver configuration files.
To fixe it we did a very simple patch (attached)  (against version uClibc 0.9.29).

The idea is that if a ns lookup fails then the nameserver file is reloaded. I believe that the overhead of reloading the nameservers in case of ns lookup failure is really small.

The patch is a few line long in libc/inet/resolv.c file.

I have seen that in head version of resolv.c has been refactored a little (which is a good thing), but this prb has not been taken care of. Instead there is a new thing (which I believe is actually not very usefull): the nameserver file is reloaded every 256 seconds.

The reload on failure patch could be applied on head version.

Is anybody interested ? How can we go further ?

Regards

C.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolv-nameserver.patch
Type: application/octet-stream
Size: 835 bytes
Desc: resolv-nameserver.patch
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20091013/a44fb35d/attachment.obj>


More information about the uClibc mailing list