lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #49134] mDNS should not advertise invalid IPv4 address


From: Daniel Elstner
Subject: [lwip-devel] [bug #49134] mDNS should not advertise invalid IPv4 address
Date: Mon, 19 Sep 2016 21:18:35 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?49134>

                 Summary: mDNS should not advertise invalid IPv4 address
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: danielk
            Submitted on: Mon 19 Sep 2016 11:18:32 PM CEST
                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: git head

    _______________________________________________________

Details:

The lwIP mDNS documentation says:


It is recommended to call this function after an IPv4 address has been set,
since there is currently no check if the v4 address is valid.


The problem is that this requirement isn't really feasible in a dual-stack
configuration using DHCP to configure the IPv4 address. There may or may not
be a DHCP server on the network, so the IPv4 address may actually stay invalid
indefinitely. However, this should not preclude IPv6 name resolving from
working, especially since with IPv6 there will almost always be some valid
address, even if only the link-local one.

Thus, it should be possible to activate the mDNS responder right after the
interface comes up, without waiting for a DHCPv4 lease which may never
arrive.

The attached patch adds some checks to the mDNS code to prevent it from
sending 0.0.0.0 in IPv4 A and PTR records. I hope I caught all cases. It does
work for me and I'm no longer seeing 0.0.0.0 records in Wireshark; so that's
that.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 19 Sep 2016 11:18:32 PM CEST  Name:
0001-Do-not-announce-an-invalid-IPv4-address-via-mDNS.patch  Size: 2kB   By:
danielk

<http://savannah.nongnu.org/bugs/download.php?file_id=38559>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?49134>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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