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: Mon, 22 Jun 2015 12:14:06 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello Michael,

On Thu, Jun 11, 2015 at 11:04:55AM +0200, Sylvain Rochet wrote:
> 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.

I created a patch entry on the tracker (#8692) with a patch for my 
proposal so it doesn't get forgotten.

If you wish you can re-upload your patch using git format-patch instead 
of diff so we'll have all the ownership metadata inlined in patch, which 
makes the patch easier to apply.

Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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