On Mon, Oct 12, 2009 at 12:41, David Francois
<[email protected]>wrote:

> Hi,
>
> I have some troubles with the gethostbyname function on uclibc-0.9.29.
>
> I have developed a short program which does periodically a gethostbyname.
> The problem is if I change the network interface (ETH to WLAN for example)
> while this short program is running, the gethostbyname function returns a
> host not found error,  but the network is correctly mounted since I can ping
>  any URLs or IP address.
>
> When I remount the previous unmounted network interface, the program logs
> the IP address of the given server.
>
> Here the source  code:
> [...]


Rather than generically pinging, you might want to focus on whether you can
reach your DNS servers.  gethostbyname() should be sending UDP/53 in the
wire and getting responses, but changing adapters might break the outbound
or return path.

Allan
-- 
[email protected]  "金鱼" http://linkedin.com/in/goldfish
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to