lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Assertion fails in dns.c after PPP interface is down


From: Sylvain Rochet
Subject: Re: [lwip-devel] Assertion fails in dns.c after PPP interface is down
Date: Thu, 11 Jun 2015 11:04:55 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello Michael,

On Wed, Jun 10, 2015 at 04:21:09PM +0200, Michael Waeber wrote:
> If the ppp netif is shut down, e.g. because of a GPRS connection loss,
> the DNS server address is set to the unspecified address (0.0.0.0) in
> ppp.c cdns(). If a client application calls dns_gethostbyname() the
> assertion in dns_send() is triggered:
> 
> >  LWIP_ASSERT("dns server has no IP address set",
> !ip_addr_isany(&dns_servers[entry->server_idx]));
> 
> I think, if no DNS server is configured, dns_gethostbyname() should
> succeed with "not found". Proposal patch attached.

There is an other option, PPP could also switch back to 
DNS_SERVER_ADDRESS, I'll let Simon decide :)

Indeed returning straight off if no DNS server is configured looks like 
better from an overall design point of view, but who cares if uplink is 
currently down ?  It might also help apps which are not designed with an 
holdoff between tries which will then loop as fast as possible on DNS 
request.

Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]