Skip to contentSkip to conversation

mdns: Upgrade 1310.140.1 -> 1790.40.31

PATCH New Alex Kiernan 1 participant 1 message Dec 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mdns: Upgrade 1310.140.1 -> 1790.40.31

Reinstate and rework patches from @garmin.com dropped in 21afab4609d0 ("mdns: update to version 1096.40.7") as these were the functional pieces of this series; we should either maintain it as a whole or drop it in its entirety. With this update and without this series, steady-state operation is a constant churn of all names being removed and re-added every few seconds. These were refactored to handle the move to getifaddrs() from get_ifi_info().

Check and cleanup all the other patches, much of which was redundant.

Move source releases to github which is where the Apple site now redirects to (though these are still effectively just tarball dumps into git).

Cleanup the recipe so it doesn't override all the packaging defaults.

Fixup musl installs so they don't fail attempting to patch a non-existent /etc/nsswitch.conf.

---
 .../0001-dns-sd-Include-missing-headers.patch |  41 ---
 .../0001-mdns-include-stddef.h-for-NULL.patch |  40 ---
 ...-cross-compilation-fixes-for-bitbake.patch | 145 ----------
 .../files/0006-Remove-unneeded-function.patch |  51 ----
 .../0009-Fix-possible-NULL-dereference.patch  |  45 ----
 ...ic-allocation-to-file-scope-variable.patch |  53 ----
 ...utine-for-cleaning-recent-interfaces.patch |  26 +-
 .../0001-dns-sd-Include-missing-headers.patch |  30 +++
 ...outine-for-tearing-down-an-interface.patch |  15 +-
 ...ke-Set-libdns_sd.so-soname-correctly.patch |  27 ++
 .../0003-Track-interface-socket-family.patch  |  15 +-
 ...rop-MacOS-specific-__block-qualifier.patch |  30 +++
 ...cate-loopback-interface-to-mDNS-core.patch |  58 ++++
 ...-Separate-TLS-targets-from-libraries.patch |  64 +++++
 ...005-Use-list-for-changed-interfaces.patch} |  48 ++--
 ...-mDNSCore-Fix-broken-debug-parameter.patch |  26 ++
 .../0006-Handle-noisy-netlink-sockets.patch   | 252 ++++++++++++++++++
 .../0006-make-Add-top-level-Makefile.patch    |  25 ++
 ...deleted-interfaces-as-being-changed.patch} |  11 +-
 ...008-Handle-errors-from-socket-calls.patch} |  17 +-
 .../mdns/{files => mdns}/mdns.service         |   0
 .../recipes-protocols/mdns/mdns_1310.140.1.bb | 115 --------
 .../recipes-protocols/mdns/mdns_1790.40.31.bb | 130 +++++++++
 23 files changed, 707 insertions(+), 557 deletions(-)
 delete mode 100644 meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch
 delete mode 100644 meta-networking/recipes-protocols/mdns/files/0001-mdns-include-stddef.h-for-NULL.patch
 delete mode 100644 meta-networking/recipes-protocols/mdns/files/0002-mdns-cross-compilation-fixes-for-bitbake.patch
 delete mode 100644 meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch
 delete mode 100644 meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch
 delete mode 100644 meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch
 rename meta-networking/recipes-protocols/mdns/{files => mdns}/0001-Create-subroutine-for-cleaning-recent-interfaces.patch (76%)
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch
 rename meta-networking/recipes-protocols/mdns/{files => mdns}/0002-Create-subroutine-for-tearing-down-an-interface.patch (78%)
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch
 rename meta-networking/recipes-protocols/mdns/{files => mdns}/0003-Track-interface-socket-family.patch (76%)
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0003-mDNSShared-Drop-MacOS-specific-__block-qualifier.patch
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch
 rename meta-networking/recipes-protocols/mdns/{files/0004-Use-list-for-changed-interfaces.patch => mdns/0005-Use-list-for-changed-interfaces.patch} (82%)
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch
 rename meta-networking/recipes-protocols/mdns/{files/0008-Mark-deleted-interfaces-as-being-changed.patch => mdns/0007-Mark-deleted-interfaces-as-being-changed.patch} (83%)
 rename meta-networking/recipes-protocols/mdns/{files/0010-Handle-errors-from-socket-calls.patch => mdns/0008-Handle-errors-from-socket-calls.patch} (81%)
 rename meta-networking/recipes-protocols/mdns/{files => mdns}/mdns.service (100%)
 delete mode 100644 meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb
 create mode 100644 meta-networking/recipes-protocols/mdns/mdns_1790.40.31.bb
meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch deleted +0 -41
deleted file mode 100644
index c743b3eddb7e..000000000000
@@ -1,41 +0,0 @@
-From ea442b57f7a9bcd41d5b5bd1cafde4dbe5685d41 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Thu, 4 Nov 2021 07:31:32 -0700
-Subject: [PATCH] dns-sd: Include missing headers
-
-Fixes build on Musl
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
----
- Clients/dns-sd.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/Clients/dns-sd.c
-+++ b/Clients/dns-sd.c
-@@ -58,11 +58,13 @@
- //#define TEST_NEW_CLIENTSTUB 1
- 
- #include <ctype.h>
-+#include <stdarg.h>          // For va_args
- #include <stdio.h>          // For stdout, stderr
- #include <stdlib.h>         // For exit()
- #include <string.h>         // For strlen(), strcpy()
- #include <errno.h>          // For errno, EINTR
- #include <time.h>
-+#include <sys/param.h>      // For MIN
- #include <sys/types.h>      // For u_char
- #ifdef APPLE_OSX_mDNSResponder
- #include <inttypes.h>       // For PRId64
---- a/mDNSPosix/nss_mdns.c
-+++ b/mDNSPosix/nss_mdns.c
-@@ -89,6 +89,9 @@
- 
- #include <dns_sd.h>
- 
-+#if !defined(NETDB_INTERNAL)
-+#  define NETDB_INTERNAL (-1)
-+#endif
- 
- //----------
- // Public functions
meta-networking/recipes-protocols/mdns/files/0001-mdns-include-stddef.h-for-NULL.patch deleted +0 -40
deleted file mode 100644
index c57ce8fa538f..000000000000
@@ -1,40 +0,0 @@
-From d744609c56f9872e5aa71707f1f71feec9867f51 Mon Sep 17 00:00:00 2001
-From: Mikko Rapeli <[email protected]>
-Date: Tue, 14 Jul 2020 16:36:29 +0000
-Subject: [PATCH 1/2] mdns: include <stddef.h> for NULL
-
-Fixes build error with version 1096.40.7:
-
-../mDNSCore/mDNS.c:11385:26: error: 'NULL' undeclared (first use in this function)
-11385 |     const char *reason = NULL;
-      |                          ^~~~
-../mDNSCore/mDNS.c:56:1: note: 'NULL' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
-   55 | #include "dns_sd_internal.h"
-  +++ |+#include <stddef.h>
-   56 |
-../mDNSCore/mDNS.c:11385:26: note: each undeclared identifier is reported only once for each function it appears in
-11385 |     const char *reason = NULL;
-      |                          ^~~~
-
-Upstream-Status: Pending
-
-Signed-off-by: Mikko Rapeli <[email protected]>
----
- mDNSCore/mDNS.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c
-index 2fbea04..d4b9af5 100755
---- a/mDNSCore/mDNS.c
-+++ b/mDNSCore/mDNS.c
-@@ -23,6 +23,7 @@
-  * routines, or types (which may or may not be present on any given platform).
-  */
- 
-+#include <stddef.h> /* for NULL */
- #include "DNSCommon.h"                  // Defines general DNS utility routines
- #include "uDNS.h"                       // Defines entry points into unicast-specific routines
-
--- 
-2.20.1
-
meta-networking/recipes-protocols/mdns/files/0002-mdns-cross-compilation-fixes-for-bitbake.patch deleted +0 -145

145 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/files/0006-Remove-unneeded-function.patch deleted +0 -51

51 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch deleted +0 -45

45 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch deleted +0 -53

53 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch renamed from meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch +14 -12
similarity index 76%
rename from meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch
rename to meta-networking/recipes-protocols/mdns/mdns/0001-Create-subroutine-for-cleaning-recent-interfaces.patch
index f8efc10448ac..91198dea733c 100644
@@ -1,7 +1,7 @@
-From 6d90f9fdaf008f5c3b8fd8d91594fa1461437888 Mon Sep 17 00:00:00 2001
+From c1f3e19d3cb0aa948248616eb1684a1e80aa39b4 Mon Sep 17 00:00:00 2001
 From: Nate Karstens <[email protected]>
 Date: Wed, 28 Jun 2017 17:30:00 -0500
-Subject: [PATCH] Create subroutine for cleaning recent interfaces
+Subject: [PATCH 1/8] Create subroutine for cleaning recent interfaces
 
 Moves functionality for cleaning the list of recent
 interfaces into its own subroutine.
@@ -9,15 +9,16 @@ interfaces into its own subroutine.
 Upstream-Status: Submitted [[email protected]]
 
 Signed-off-by: Nate Karstens <[email protected]>
+Signed-off-by: Alex Kiernan <[email protected]>
 ---
- mDNSPosix/mDNSPosix.c | 23 ++++++++++++++---------
- 1 file changed, 14 insertions(+), 9 deletions(-)
+ mDNSPosix/mDNSPosix.c | 24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
 
 diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
-index a63cd19..7aeee7b 100755
+index 0a7c3dfa2475..fe7242d83599 100644
 --- a/mDNSPosix/mDNSPosix.c
 +++ b/mDNSPosix/mDNSPosix.c
-@@ -1199,6 +1199,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
+@@ -1322,6 +1322,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
      return err;
  }
  
@@ -30,17 +31,18 @@ index a63cd19..7aeee7b 100755
 +    {
 +        PosixNetworkInterface *pi = *ri;
 +        if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next;
-+        else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; free(pi); }
++        else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; mdns_free(pi); }
 +    }
 +}
 +
  // Creates a PosixNetworkInterface for the interface whose IP address is
  // intfAddr and whose name is intfName and registers it with mDNS core.
- mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask, const char *intfName, int intfIndex)
-@@ -1388,15 +1401,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
+ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct sockaddr *intfMask,
+@@ -1559,16 +1572,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
+ 
      // Clean up.
      if (intfList != NULL) freeifaddrs(intfList);
- 
+-
 -    // Clean up any interfaces that have been hanging around on the RecentInterfaces list for more than a minute
 -    PosixNetworkInterface **ri = &gRecentInterfaces;
 -    const mDNSs32 utc = mDNSPlatformUTC();
@@ -48,12 +50,12 @@ index a63cd19..7aeee7b 100755
 -    {
 -        PosixNetworkInterface *pi = *ri;
 -        if (utc - pi->LastSeen < 60) ri = (PosixNetworkInterface **)&pi->coreIntf.next;
--        else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; free(pi); }
+-        else { *ri = (PosixNetworkInterface *)pi->coreIntf.next; mdns_free(pi); }
 -    }
 +    CleanRecentInterfaces();
  
      return err;
  }
 -- 
-2.20.1
+2.35.1
 
meta-networking/recipes-protocols/mdns/mdns/0001-dns-sd-Include-missing-headers.patch new file +30 -0
new file mode 100644
index 000000000000..4a60a9572896
@@ -0,0 +1,30 @@
+From cea342c10731cb1c8c8b52f03d55f9d15fc3b091 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 4 Nov 2021 07:31:32 -0700
+Subject: [PATCH 1/6] dns-sd: Include missing headers
+
+Fixes build on Musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ mDNSPosix/nss_mdns.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/mDNSPosix/nss_mdns.c b/mDNSPosix/nss_mdns.c
+index afadb3c6c33b..84c312759463 100644
+--- a/mDNSPosix/nss_mdns.c
++++ b/mDNSPosix/nss_mdns.c
+@@ -89,6 +89,9 @@
+ 
+ #include <dns_sd.h>
+ 
++#if !defined(NETDB_INTERNAL)
++#  define NETDB_INTERNAL (-1)
++#endif
+ 
+ //----------
+ // Public functions
+-- 
+2.35.1
+
meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch renamed from meta-networking/recipes-protocols/mdns/files/0002-Create-subroutine-for-tearing-down-an-interface.patch +8 -7
similarity index 78%
rename from meta-networking/recipes-protocols/mdns/files/0002-Create-subroutine-for-tearing-down-an-interface.patch
rename to meta-networking/recipes-protocols/mdns/mdns/0002-Create-subroutine-for-tearing-down-an-interface.patch
index 21ba3184991c..aa3dda8d55b7 100644
@@ -1,22 +1,23 @@
-From a2148df99ddcd122247f95c4cbcce5c4118581a1 Mon Sep 17 00:00:00 2001
+From 40ef0241afbb49f84e76afd65eb3ee17466bb582 Mon Sep 17 00:00:00 2001
 From: Nate Karstens <[email protected]>
 Date: Wed, 28 Jun 2017 17:30:00 -0500
-Subject: [PATCH 02/11] Create subroutine for tearing down an interface
+Subject: [PATCH 2/8] Create subroutine for tearing down an interface
 
 Creates a subroutine for tearing down an interface.
 
 Upstream-Status: Submitted [[email protected]]
 
 Signed-off-by: Nate Karstens <[email protected]>
+Signed-off-by: Alex Kiernan <[email protected]>
 ---
  mDNSPosix/mDNSPosix.c | 22 ++++++++++++++++------
  1 file changed, 16 insertions(+), 6 deletions(-)
 
 diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
-index ffc9696..5e5b2cd 100644
+index fe7242d83599..a32a880c0ce5 100644
 --- a/mDNSPosix/mDNSPosix.c
 +++ b/mDNSPosix/mDNSPosix.c
-@@ -591,6 +591,19 @@ mDNSlocal void FreePosixNetworkInterface(PosixNetworkInterface *intf)
+@@ -1043,6 +1043,19 @@ mDNSlocal void FreePosixNetworkInterface(PosixNetworkInterface *intf)
      gRecentInterfaces = intf;
  }
  
@@ -36,7 +37,7 @@ index ffc9696..5e5b2cd 100644
  // Grab the first interface, deregister it, free it, and repeat until done.
  mDNSlocal void ClearInterfaceList(mDNS *const m)
  {
-@@ -599,13 +612,10 @@ mDNSlocal void ClearInterfaceList(mDNS *const m)
+@@ -1051,13 +1064,10 @@ mDNSlocal void ClearInterfaceList(mDNS *const m)
      while (m->HostInterfaces)
      {
          PosixNetworkInterface *intf = (PosixNetworkInterface*)(m->HostInterfaces);
@@ -52,7 +53,7 @@ index ffc9696..5e5b2cd 100644
 +    assert(num_registered_interfaces == 0);
  }
  
- // Sets up a send/receive socket.
+ mDNSlocal int SetupIPv6Socket(int fd)
 -- 
-2.17.1
+2.35.1
 
meta-networking/recipes-protocols/mdns/mdns/0002-make-Set-libdns_sd.so-soname-correctly.patch new file +27 -0
new file mode 100644
index 000000000000..7f660396b4e3
@@ -0,0 +1,27 @@
+From a198bcd457abd04f2e22812ff3a37246aa564614 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <[email protected]>
+Date: Mon, 5 Dec 2022 15:14:12 +0000
+Subject: [PATCH 2/6] make: Set libdns_sd.so soname correctly
+
+Upstream-Status: Pending
+Signed-off-by: Alex Kiernan <[email protected]>
+---
+ mDNSPosix/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile
+index 802a13dd70b6..5e74193c0e89 100755
+--- a/mDNSPosix/Makefile
++++ b/mDNSPosix/Makefile
+@@ -276,7 +276,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
+ CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o $(OBJDIR)/dnssd_errstring.c.so.o
+ 
+ $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
+-	$(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+
++	$(LD) $(SOOPTS) $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+
+ 	$(STRIP) $@
+ 
+ Clients: setup libdns_sd ../Clients/build/dns-sd
+-- 
+2.35.1
+
meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch renamed from meta-networking/recipes-protocols/mdns/files/0003-Track-interface-socket-family.patch +8 -7
similarity index 76%
rename from meta-networking/recipes-protocols/mdns/files/0003-Track-interface-socket-family.patch
rename to meta-networking/recipes-protocols/mdns/mdns/0003-Track-interface-socket-family.patch
index 8c0e6bf3976a..d2a9995ffa43 100644
@@ -1,23 +1,24 @@
-From 71a7c728ae0d8143b66aa40decca74ebaa9aa2ce Mon Sep 17 00:00:00 2001
+From deb3a2c51f32e0d2741be11a492e727129f770e2 Mon Sep 17 00:00:00 2001
 From: Nate Karstens <[email protected]>
 Date: Wed, 28 Jun 2017 17:30:00 -0500
-Subject: [PATCH 03/11] Track interface socket family
+Subject: [PATCH 3/8] Track interface socket family
 
 Tracks the socket family associated with the interface.
 
 Upstream-Status: Submitted [[email protected]]
 
 Signed-off-by: Nate Karstens <[email protected]>
+Signed-off-by: Alex Kiernan <[email protected]>
 ---
  mDNSPosix/mDNSPosix.c | 1 +
  mDNSPosix/mDNSPosix.h | 2 ++
  2 files changed, 3 insertions(+)
 
 diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
-index 5e5b2cd..8fe22be 100644
+index a32a880c0ce5..9a5b4d7ea4cb 100644
 --- a/mDNSPosix/mDNSPosix.c
 +++ b/mDNSPosix/mDNSPosix.c
-@@ -918,6 +918,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
+@@ -1415,6 +1415,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
          // Set up the extra fields in PosixNetworkInterface.
          assert(intf->intfName != NULL);         // intf->intfName already set up above
          intf->index                = intfIndex;
@@ -26,7 +27,7 @@ index 5e5b2cd..8fe22be 100644
  #if HAVE_IPV6
          intf->multicastSocket6     = -1;
 diff --git a/mDNSPosix/mDNSPosix.h b/mDNSPosix/mDNSPosix.h
-index ca60d80..f77c185 100644
+index 9675591b0434..dd7864cd0d5e 100644
 --- a/mDNSPosix/mDNSPosix.h
 +++ b/mDNSPosix/mDNSPosix.h
 @@ -19,6 +19,7 @@
@@ -38,7 +39,7 @@ index ca60d80..f77c185 100644
  
  #ifdef  __cplusplus
 @@ -40,6 +41,7 @@ struct PosixNetworkInterface
-     const char *            intfName;
+     char *                  intfName;
      PosixNetworkInterface * aliasIntf;
      int index;
 +    sa_family_t sa_family;
@@ -46,5 +47,5 @@ index ca60d80..f77c185 100644
  #if HAVE_IPV6
      int multicastSocket6;
 -- 
-2.17.1
+2.35.1
 
meta-networking/recipes-protocols/mdns/mdns/0003-mDNSShared-Drop-MacOS-specific-__block-qualifier.patch new file +30 -0
new file mode 100644
index 000000000000..0ac0bb6a4587
@@ -0,0 +1,30 @@
+From 4c0954f77ba05d77192ee1519929a39fbc978321 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <[email protected]>
+Date: Mon, 5 Dec 2022 15:14:22 +0000
+Subject: [PATCH 3/6] mDNSShared: Drop MacOS specific __block qualifier
+
+Support for this extension only exists in MacOS/Clang, also it's not
+actually used here, so we can just drop it.
+
+Upstream-Status: Pending
+Signed-off-by: Alex Kiernan <[email protected]>
+---
+ mDNSShared/uds_daemon.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mDNSShared/uds_daemon.c b/mDNSShared/uds_daemon.c
+index 9ae5f78542d6..8c006b71a4ea 100644
+--- a/mDNSShared/uds_daemon.c
++++ b/mDNSShared/uds_daemon.c
+@@ -2912,7 +2912,7 @@ exit:
+ mDNSlocal mStatus add_domain_to_browser(request_state *info, const domainname *d)
+ {
+     browser_t *b, *p;
+-    __block mStatus err;
++    mStatus err;
+ 
+     for (p = info->u.browser.browsers; p; p = p->next)
+     {
+-- 
+2.35.1
+
meta-networking/recipes-protocols/mdns/mdns/0004-Indicate-loopback-interface-to-mDNS-core.patch new file +58 -0

58 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/mdns/0004-make-Separate-TLS-targets-from-libraries.patch new file +64 -0

64 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/mdns/0005-Use-list-for-changed-interfaces.patch renamed from meta-networking/recipes-protocols/mdns/files/0004-Use-list-for-changed-interfaces.patch +20 -28

131 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/mdns/0005-mDNSCore-Fix-broken-debug-parameter.patch new file +26 -0
new file mode 100644
index 000000000000..6553f6b9832e
@@ -0,0 +1,26 @@
+From 60533a8947af714cc593bae6b20d47f3a4828589 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <[email protected]>
+Date: Mon, 5 Dec 2022 22:49:49 +0000
+Subject: [PATCH 5/6] mDNSCore: Fix broken debug parameter
+
+Signed-off-by: Alex Kiernan <[email protected]>
+---
+ mDNSCore/mDNS.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mDNSCore/mDNS.c b/mDNSCore/mDNS.c
+index 66979587ee82..e0a982fa1762 100644
+--- a/mDNSCore/mDNS.c
++++ b/mDNSCore/mDNS.c
+@@ -9831,7 +9831,7 @@ mDNSlocal void mDNSCoreReceiveNoUnicastAnswers(mDNS *const m, const DNSMessage *
+ #else
+                             const DNSServRef dnsserv = qptr->qDNSServer;
+ #endif
+-                            debugf("mDNSCoreReceiveNoUnicastAnswers making negative cache entry TTL %d for %##s (%s)", negttl, name->c, DNSTypeName(q.qtype));
++                            debugf("mDNSCoreReceiveNoUnicastAnswers making negative cache entry TTL %d for %##s (%s)", negttl, currentQName->c, DNSTypeName(q.qtype));
+                             // Create a negative record for the current name in the CNAME chain.
+                             MakeNegativeCacheRecord(m, &m->rec.r, currentQName, currentQNameHash, q.qtype, q.qclass, negttl, mDNSInterface_Any,
+                                 dnsserv, response->h.flags);
+-- 
+2.35.1
+
meta-networking/recipes-protocols/mdns/mdns/0006-Handle-noisy-netlink-sockets.patch new file +252 -0

252 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/mdns/0006-make-Add-top-level-Makefile.patch new file +25 -0
new file mode 100644
index 000000000000..268e574c5090
@@ -0,0 +1,25 @@
+From fa9ef50ab4c4225cf3ade4bafc38ddf93e6fe127 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <[email protected]>
+Date: Tue, 6 Dec 2022 13:28:31 +0000
+Subject: [PATCH 6/6] make: Add top-level Makefile
+
+Simple top level Makefile that just delegates to mDNSPosix.
+
+Upstream-Status: Inappropriate [oe-specific]
+Signed-off-by: Alex Kiernan <[email protected]>
+---
+ Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+ create mode 100644 Makefile
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 000000000000..feb6ac67ef47
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,2 @@
++all clean:
++	cd mDNSPosix && $(MAKE) $@
+-- 
+2.35.1
+
meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch renamed from meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch +6 -5
similarity index 83%
rename from meta-networking/recipes-protocols/mdns/files/0008-Mark-deleted-interfaces-as-being-changed.patch
rename to meta-networking/recipes-protocols/mdns/mdns/0007-Mark-deleted-interfaces-as-being-changed.patch
index fdc5105cb9d4..e53b0fd3ae7a 100644
@@ -1,7 +1,7 @@
-From 0fcc0f210f3a9310a1963de640b384ce866410fd Mon Sep 17 00:00:00 2001
+From a8accffb95267490b50401c8b65ec18db57b5ef5 Mon Sep 17 00:00:00 2001
 From: Nate Karstens <[email protected]>
 Date: Wed, 9 Aug 2017 09:16:58 -0500
-Subject: [PATCH 08/11] Mark deleted interfaces as being changed
+Subject: [PATCH 7/8] Mark deleted interfaces as being changed
 
 Netlink notification handling ignores messages for deleted links,
 RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu-
@@ -17,15 +17,16 @@ Testing and Verification Instructions:
 Upstream-Status: Submitted [[email protected]]
 
 Signed-off-by: Nate Karstens <[email protected]>
+Signed-off-by: Alex Kiernan <[email protected]>
 ---
  mDNSPosix/mDNSPosix.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
-index 798ab10..a8a57df 100644
+index 5d52de31f79b..77d982f4c50b 100644
 --- a/mDNSPosix/mDNSPosix.c
 +++ b/mDNSPosix/mDNSPosix.c
-@@ -1163,7 +1163,7 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+@@ -1714,7 +1714,7 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
  #endif
  
          // Process the NetLink message
@@ -35,5 +36,5 @@ index 798ab10..a8a57df 100644
          else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR)
              AddInterfaceIndexToList(changedInterfaces, ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index);
 -- 
-2.17.1
+2.35.1
 
meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch renamed from meta-networking/recipes-protocols/mdns/files/0010-Handle-errors-from-socket-calls.patch +9 -8
similarity index 81%
rename from meta-networking/recipes-protocols/mdns/files/0010-Handle-errors-from-socket-calls.patch
rename to meta-networking/recipes-protocols/mdns/mdns/0008-Handle-errors-from-socket-calls.patch
index b9b01572761f..e689f8c2675c 100644
@@ -1,7 +1,7 @@
-From 382b3b924e43abd1bdc5792918161d0922666691 Mon Sep 17 00:00:00 2001
+From ed58146d3aeecdb9920fdc017f85c18b5b10f2db Mon Sep 17 00:00:00 2001
 From: Nate Karstens <[email protected]>
 Date: Thu, 10 Aug 2017 08:27:32 -0500
-Subject: [PATCH 10/11] Handle errors from socket calls
+Subject: [PATCH 8/8] Handle errors from socket calls
 
 Adds handling for socket() or read() returning a
 negative value (indicating an error has occurred).
@@ -9,15 +9,16 @@ negative value (indicating an error has occurred).
 Upstream-Status: Submitted [[email protected]]
 
 Signed-off-by: Nate Karstens <[email protected]>
+Signed-off-by: Alex Kiernan <[email protected]>
 ---
  mDNSPosix/mDNSPosix.c | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
-index 3243ed4..84af26b 100644
+index 77d982f4c50b..cab512160afb 100644
 --- a/mDNSPosix/mDNSPosix.c
 +++ b/mDNSPosix/mDNSPosix.c
-@@ -1129,7 +1129,7 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+@@ -1677,7 +1677,7 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
  // Read through the messages on sd and if any indicate that any interface records should
  // be torn down and rebuilt, return affected indices as a bitmask. Otherwise return 0.
  {
@@ -26,7 +27,7 @@ index 3243ed4..84af26b 100644
      char buff[4096];
      struct nlmsghdr         *pNLMsg = (struct nlmsghdr*) buff;
  
-@@ -1138,7 +1138,10 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+@@ -1686,7 +1686,10 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
      // enough to hold all pending data and so avoid message fragmentation.
      // (Note that FIONREAD is not supported on AF_NETLINK.)
  
@@ -38,7 +39,7 @@ index 3243ed4..84af26b 100644
      while (1)
      {
          // Make sure we've got an entire nlmsghdr in the buffer, and payload, too.
-@@ -1154,7 +1157,9 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
+@@ -1702,7 +1705,9 @@ mDNSlocal void          ProcessRoutingNotification(int sd, GenLinkedList *change
                  pNLMsg = (struct nlmsghdr*) buff;
  
                  // read more data
@@ -49,7 +50,7 @@ index 3243ed4..84af26b 100644
                  continue;                   // spin around and revalidate with new readCount
              }
              else
-@@ -1429,6 +1434,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanReceiveUnicast(void)
+@@ -2017,6 +2022,7 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanReceiveUnicast(void)
      int err;
      int s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
      struct sockaddr_in s5353;
@@ -58,5 +59,5 @@ index 3243ed4..84af26b 100644
      s5353.sin_port        = MulticastDNSPort.NotAnInteger;
      s5353.sin_addr.s_addr = 0;
 -- 
-2.17.1
+2.35.1
 
meta-networking/recipes-protocols/mdns/mdns/mdns.service renamed from meta-networking/recipes-protocols/mdns/files/mdns.service +0 -0
similarity index 100%
rename from meta-networking/recipes-protocols/mdns/files/mdns.service
rename to meta-networking/recipes-protocols/mdns/mdns/mdns.service
meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb deleted +0 -115

115 lines not on this page · raw message

meta-networking/recipes-protocols/mdns/mdns_1790.40.31.bb new file +130 -0

130 lines not on this page · raw message

Signature · 1 line
2.35.1