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: Jan Breuer
Subject: Re: [lwip-devel] Assertion fails in dns.c after PPP interface is down
Date: Mon, 22 Jun 2015 12:35:10 +0200

Hi Sylvain,
your proposal is not a solution. Not for all cases.

I have discovered this behaviour also in common Ethernet network where the user can set all network parameters of the device including DNS. Setting DNS to 0.0.0.0 is still valid operation - disable DNS functionality at runtime - and all calls to dns_gethostbyname should return "not found". It don't mind, if we are in PPP, Ethernet with static address or we have address assigned by DHCP which does not tell us DNS server.

Best regards,
Jan






2015-06-22 12:14 GMT+02:00 Sylvain Rochet <address@hidden>:
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

_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel



reply via email to

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