lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #58571] DNS host list is global even for multiple neti


From: Ashley Duncan
Subject: [lwip-devel] [bug #58571] DNS host list is global even for multiple netifs
Date: Sun, 14 Jun 2020 19:03:33 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36

URL:
  <https://savannah.nongnu.org/bugs/?58571>

                 Summary: DNS host list is global even for multiple netifs
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ashesman
            Submitted on: Sun 14 Jun 2020 11:03:31 PM UTC
                Category: DNS
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.1.1

    _______________________________________________________

Details:

I have stumbled across a problem today where DNS resolution was failing when
using multiple netifs.  I tracked it down to the use of a global dns_servers
array that is updated by the last netif that gets given a DNS address, even if
that netif has no internet connection.  Other netifs can then not perform DNS
resolution even though they have a valid internet connection.

Could the dns_servers array not be part of netif so that the correct dns
server address can be fetched from the current default netif?  Other sending
activities default to using the default netif.

Use case:

In this instance there is a DHCP capable ethernet interface and a PPP wifi
interface.  Both of these interfaces set the dns_servers array while
negotiating IP address.  Depending on which netif sets the dns_servers array
last sets the IP address used for DNS resolution.

Typically Ethernet is set as the default netif and has a valid internet
connection.  It comes up first and sets a DNS  address given by DHCP.

The PPP interface is always up, even if the wifi module has no link, which it
often doesn't.  It comes up second setting dns_servers to the PPP given
values, overwriting the ethernet dns address.

If I try to use DNS resolution on ethernet, it uses the PPP dns_server values
which of course fails.  If I unplug ethernet, plug it back in.  dns_servers
are updated by the Ethernets DHCP, then then DNS resolution can be used.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?58571>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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