mdns: update to version 1096.40.7
PATCH 1/3 mdns: update to version 1096.40.7
Refresh Makefile patch (build.patch) to properly cross compile mdns. Then try refresh patches which still apply. Following patches don't apply anymore due to refactoring done on mdns side so thus dropping patches:
* 0005-Handle-noisy-netlink-sockets.patch
* 0007-Indicate-loopback-interface-to-mDNS-core.patch
---
...utine-for-cleaning-recent-interfaces.patch | 21 +-
.../0001-mdns-include-stddef.h-for-NULL.patch | 40 ++++
...-cross-compilation-fixes-for-bitbake.patch | 145 ++++++++++++
...0004-Use-list-for-changed-interfaces.patch | 28 +--
.../0005-Handle-noisy-netlink-sockets.patch | 212 ------------------
...cate-loopback-interface-to-mDNS-core.patch | 129 -----------
...ic-allocation-to-file-scope-variable.patch | 20 +-
.../recipes-protocols/mdns/files/build.patch | 167 --------------
.../{mdns_878.270.2.bb => mdns_1096.40.7.bb} | 9 +-
9 files changed, 224 insertions(+), 547 deletions(-)
create mode 100644 meta-networking/recipes-protocols/mdns/files/0001-mdns-include-stddef.h-for-NULL.patch
create 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/0005-Handle-noisy-netlink-sockets.patch
delete mode 100644 meta-networking/recipes-protocols/mdns/files/0007-Indicate-loopback-interface-to-mDNS-core.patch
delete mode 100644 meta-networking/recipes-protocols/mdns/files/build.patch
rename meta-networking/recipes-protocols/mdns/{mdns_878.270.2.bb => mdns_1096.40.7.bb} (91%)meta-networking/recipes-protocols/mdns/files/0001-Create-subroutine-for-cleaning-recent-interfaces.patch +10 -11
@@ -1,7 +1,7 @@ -From 89ea6ac4a8840e8c2be0140a9805c6522c6c5280 Mon Sep 17 00:00:00 2001 +From 6d90f9fdaf008f5c3b8fd8d91594fa1461437888 Mon Sep 17 00:00:00 2001 From: Nate Karstens <[email protected]> Date: Wed, 28 Jun 2017 17:30:00 -0500 -Subject: [PATCH 01/11] Create subroutine for cleaning recent interfaces +Subject: [PATCH] Create subroutine for cleaning recent interfaces Moves functionality for cleaning the list of recent interfaces into its own subroutine.
@@ -10,14 +10,14 @@ Upstream-Status: Submitted [[email protected]] Signed-off-by: Nate Karstens <[email protected]> --- - mDNSPosix/mDNSPosix.c | 24 ++++++++++++++---------- - 1 file changed, 14 insertions(+), 10 deletions(-) + mDNSPosix/mDNSPosix.c | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index 0e10bd5..ffc9696 100644 +index a63cd19..7aeee7b 100755 --- a/mDNSPosix/mDNSPosix.c +++ b/mDNSPosix/mDNSPosix.c -@@ -856,6 +856,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf +@@ -1199,6 +1199,19 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf return err; }
@@ -37,11 +37,10 @@ index 0e10bd5..ffc9696 100644 // 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) -@@ -1010,16 +1023,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) - +@@ -1388,15 +1401,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) // Clean up. - if (intfList != NULL) free_ifi_info(intfList); -- + 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();
@@ -56,5 +55,5 @@ index 0e10bd5..ffc9696 100644 return err; } -- -2.17.1 +2.20.1
meta-networking/recipes-protocols/mdns/files/0001-mdns-include-stddef.h-for-NULL.patch new file +40 -0
@@ -0,0 +1,40 @@ +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 + #include "nsec.h" +-- +2.20.1 +
meta-networking/recipes-protocols/mdns/files/0002-mdns-cross-compilation-fixes-for-bitbake.patch new file +145 -0
145 lines not on this page · raw message
meta-networking/recipes-protocols/mdns/files/0004-Use-list-for-changed-interfaces.patch +14 -14
@@ -1,4 +1,4 @@ -From e1f483510a1011e37540fdee8f3bc36111fa45a0 Mon Sep 17 00:00:00 2001 +From 798bfb5e984845a27874d1a244686db6e384d7b8 Mon Sep 17 00:00:00 2001 From: Nate Karstens <[email protected]> Date: Thu, 13 Jul 2017 09:00:00 -0500 Subject: [PATCH 04/11] Use list for changed interfaces
@@ -15,10 +15,10 @@ Signed-off-by: Nate Karstens <[email protected]> 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index 8fe22be..699855a 100644 +index 195d04b..bb883c1 100755 --- a/mDNSPosix/mDNSPosix.c +++ b/mDNSPosix/mDNSPosix.c -@@ -75,6 +75,14 @@ struct IfChangeRec +@@ -67,6 +67,14 @@ struct IfChangeRec }; typedef struct IfChangeRec IfChangeRec;
@@ -31,9 +31,9 @@ index 8fe22be..699855a 100644 +typedef struct NetworkInterfaceIndex NetworkInterfaceIndex; + // Note that static data is initialized to zero in (modern) C. - static fd_set gEventFDs; - static int gMaxFD; // largest fd in gEventFDs -@@ -1071,6 +1079,32 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD) + static PosixEventSource *gEventSources; // linked list of PosixEventSource's + static sigset_t gEventSignalSet; // Signals which event loop listens for +@@ -1458,6 +1466,32 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD) return err; }
@@ -66,7 +66,7 @@ index 8fe22be..699855a 100644 #if MDNS_DEBUGMSGS mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) { -@@ -1098,14 +1132,13 @@ mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) +@@ -1485,14 +1519,13 @@ mDNSlocal void PrintNetLinkMsg(const struct nlmsghdr *pNLMsg) } #endif
@@ -82,7 +82,7 @@ index 8fe22be..699855a 100644 // The structure here is more complex than it really ought to be because, // unfortunately, there's no good way to size a buffer in advance large -@@ -1141,9 +1174,9 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) +@@ -1528,9 +1561,9 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) // Process the NetLink message if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK)
@@ -94,7 +94,7 @@ index 8fe22be..699855a 100644 // Advance pNLMsg to the next message in the buffer if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE) -@@ -1154,8 +1187,6 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) +@@ -1541,8 +1574,6 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) else break; // all done! }
@@ -103,7 +103,7 @@ index 8fe22be..699855a 100644 } #else // USES_NETLINK -@@ -1187,14 +1218,13 @@ mDNSlocal void PrintRoutingSocketMsg(const struct ifa_msghdr *pRSMsg) +@@ -1574,14 +1605,13 @@ mDNSlocal void PrintRoutingSocketMsg(const struct ifa_msghdr *pRSMsg) } #endif
@@ -119,7 +119,7 @@ index 8fe22be..699855a 100644 readCount = read(sd, buff, sizeof buff); if (readCount < (ssize_t) sizeof(struct ifa_msghdr)) -@@ -1209,12 +1239,10 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) +@@ -1596,12 +1626,10 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) pRSMsg->ifam_type == RTM_IFINFO) { if (pRSMsg->ifam_type == RTM_IFINFO)
@@ -134,7 +134,7 @@ index 8fe22be..699855a 100644 } #endif // USES_NETLINK -@@ -1224,7 +1252,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context) +@@ -1611,7 +1639,8 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) { IfChangeRec *pChgRec = (IfChangeRec*) context; fd_set readFDs;
@@ -144,7 +144,7 @@ index 8fe22be..699855a 100644 struct timeval zeroTimeout = { 0, 0 }; (void)fd; // Unused -@@ -1233,17 +1262,25 @@ mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context) +@@ -1619,17 +1648,25 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) FD_ZERO(&readFDs); FD_SET(pChgRec->NotifySD, &readFDs);
@@ -173,5 +173,5 @@ index 8fe22be..699855a 100644 // Register with either a Routing Socket or RtNetLink to listen for interface changes. -- -2.17.1 +2.20.1
meta-networking/recipes-protocols/mdns/files/0005-Handle-noisy-netlink-sockets.patch deleted +0 -212
212 lines not on this page · raw message
meta-networking/recipes-protocols/mdns/files/0007-Indicate-loopback-interface-to-mDNS-core.patch deleted +0 -129
129 lines not on this page · raw message
meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch +11 -9
@@ -1,7 +1,7 @@ -From 19de26db69408f02241e232b39224589a0f630df Mon Sep 17 00:00:00 2001 +From 9ff06108cd44e84ba6c68bfa6737e793f117e303 Mon Sep 17 00:00:00 2001 From: Nate Karstens <[email protected]> Date: Thu, 10 Aug 2017 08:46:03 -0500 -Subject: [PATCH 11/11] Change a dynamic allocation to file-scope variable +Subject: [PATCH] Change a dynamic allocation to file-scope variable Changes a variable from being dynamically-allocated to being statically-allocated at the file scope. Addresses a Coverity
@@ -11,14 +11,14 @@ Upstream-Status: Submitted [[email protected]] Signed-off-by: Nate Karstens <[email protected]> --- - mDNSPosix/mDNSPosix.c | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) + mDNSPosix/mDNSPosix.c | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index 84af26b..b7795ed 100644 +index 7aeee7b..2d25016 100755 --- a/mDNSPosix/mDNSPosix.c +++ b/mDNSPosix/mDNSPosix.c -@@ -91,6 +91,7 @@ static sigset_t gEventSignalSet; // Signals which event loop list +@@ -81,6 +81,7 @@ static sigset_t gEventSignalSet; // Signals which event loop list static sigset_t gEventSignals; // Signals which were received while inside loop static PosixNetworkInterface *gRecentInterfaces;
@@ -26,13 +26,13 @@ index 84af26b..b7795ed 100644 // *************************************************************************** // Globals (for debugging) -@@ -1412,16 +1413,11 @@ cleanup: +@@ -1641,18 +1642,11 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) mDNSlocal mStatus WatchForInterfaceChange(mDNS *const m) { mStatus err; - IfChangeRec *pChgRec; -- pChgRec = (IfChangeRec*) mDNSPlatformMemAllocate(sizeof *pChgRec); +- pChgRec = (IfChangeRec*) mDNSPlatformMemAllocateClear(sizeof *pChgRec); - if (pChgRec == NULL) - return mStatus_NoMemoryErr; -
@@ -42,10 +42,12 @@ index 84af26b..b7795ed 100644 + err = OpenIfNotifySocket(&gChgRec.NotifySD); if (err == 0) - err = mDNSPosixAddFDToEventLoop(pChgRec->NotifySD, InterfaceChangeCallback, pChgRec); +- if (err) +- mDNSPlatformMemFree(pChgRec); + err = mDNSPosixAddFDToEventLoop(gChgRec.NotifySD, InterfaceChangeCallback, &gChgRec); return err; } -- -2.17.1 +2.20.1
meta-networking/recipes-protocols/mdns/files/build.patch deleted +0 -167
167 lines not on this page · raw message
meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb renamed from meta-networking/recipes-protocols/mdns/mdns_878.270.2.bb +4 -5
@@ -9,22 +9,21 @@ COMPATIBLE_HOST_libc-musl = 'null' RPROVIDES_${PN} += "libdns_sd.so" SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \ - file://build.patch;patchdir=.. \ file://mdns.service \ + file://0001-mdns-include-stddef.h-for-NULL.patch;patchdir=.. \ + file://0002-mdns-cross-compilation-fixes-for-bitbake.patch;patchdir=.. \ file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch;patchdir=.. \ file://0002-Create-subroutine-for-tearing-down-an-interface.patch;patchdir=.. \ file://0003-Track-interface-socket-family.patch;patchdir=.. \ file://0004-Use-list-for-changed-interfaces.patch;patchdir=.. \ - file://0005-Handle-noisy-netlink-sockets.patch;patchdir=.. \ file://0006-Remove-unneeded-function.patch;patchdir=.. \ - file://0007-Indicate-loopback-interface-to-mDNS-core.patch;patchdir=.. \ file://0008-Mark-deleted-interfaces-as-being-changed.patch;patchdir=.. \ file://0009-Fix-possible-NULL-dereference.patch;patchdir=.. \ file://0010-Handle-errors-from-socket-calls.patch;patchdir=.. \ file://0011-Change-a-dynamic-allocation-to-file-scope-variable.patch;patchdir=.. \ " -SRC_URI[md5sum] = "4e139a8e1133349006b0436291c9e29b" -SRC_URI[sha256sum] = "2cef0ee9900504c5277fb81de0a28e6c0835fe482ebecf1067c6864f5c4eda74" +SRC_URI[md5sum] = "ac766013bbcb323e9db4c80805b2552a" +SRC_URI[sha256sum] = "b86f4816b4145915198e7c5bf0bc56dbbfd960e9a4518bb6486baa40cdcca7e6" PARALLEL_MAKE = ""
Signature · 1 line
2.20.1
PATCH 2/3 mdns: set CVE_PRODUCT to "apple:mdnsresponder"
This is used in CVEs like
https://nvd.nist.gov/vuln/detail/CVE-2015-7987
--- meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb +2 -0
@@ -25,6 +25,8 @@ SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${P SRC_URI[md5sum] = "ac766013bbcb323e9db4c80805b2552a" SRC_URI[sha256sum] = "b86f4816b4145915198e7c5bf0bc56dbbfd960e9a4518bb6486baa40cdcca7e6" +CVE_PRODUCT = "apple:mdnsresponder" + PARALLEL_MAKE = "" S = "${WORKDIR}/mDNSResponder-${PV}/mDNSPosix"
Signature · 1 line
2.20.1
PATCH 3/3 mdns: add BSD-3-Clause to LICENSE
In reply to Mikko RapeliThe LICENSE file in source tree says:
The majority of the source code in the mDNSResponder project is licensed under the terms of the Apache License, Version 2.0, available from:
<http://www.apache.org/licenses/LICENSE-2.0>
To accommodate license compatibility with the widest possible range of client code licenses, the shared library code, which is linked at runtime into the same address space as the client using it, is licensed under the terms of the "Three-Clause BSD License".
The Linux Name Service Switch code, contributed by National ICT Australia Ltd (NICTA) is licensed under the terms of the NICTA Public Software Licence (which is substantially similar to the "Three-Clause BSD License", with some additional language pertaining to Australian law).
--- meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb +1 -1
@@ -1,7 +1,7 @@ SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol" DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." HOMEPAGE = "http://developer.apple.com/networking/bonjour/" -LICENSE = "Apache-2.0" +LICENSE = "Apache-2.0 & BSD-3-Clause" LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf" COMPATIBLE_HOST_libc-musl = 'null'
Signature · 1 line
2.20.1
Re: [oe] [meta-networking][PATCH 3/3] mdns: add BSD-3-Clause to LICENSE
Quoted 11 lines · Mikko Rapeli
The LICENSE file in source tree says:
The majority of the source code in the mDNSResponder project is licensed under the terms of the Apache License, Version 2.0, available from:
<http://www.apache.org/licenses/LICENSE-2.0>To accommodate license compatibility with the widest possible range of client code licenses, the shared library code, which is linked at runtime into the same address space as the client using it, is licensed under the terms of the "Three-Clause BSD License".
Quoted 4 lines
The Linux Name Service Switch code, contributed by National ICT Australia Ltd (NICTA) is licensed under the terms of the NICTA Public Software Licence (which is substantially similar to the "Three-Clause BSD License", with some additional language pertaining to Australian law).
Does this also affect other version like the one in Dunfell?
-armin
Quoted 21 lines
Signed-off-by Mikko Rapeli <[email protected]>--- meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb +1
-1@@ -1,7 +1,7 @@ SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol" DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." HOMEPAGE = "http://developer.apple.com/networking/bonjour/" -LICENSE = "Apache-2.0" +LICENSE = "Apache-2.0 & BSD-3-Clause" LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf" COMPATIBLE_HOST_libc-musl = 'null'
Re: [oe] [meta-networking][PATCH 3/3] mdns: add BSD-3-Clause to LICENSE
Quoted 14 lines · On Mon, Sep 07, 2020 at 10:53:39AM -0700, akuster808 wrote:
Quoted 11 lines · Mikko Rapeli
The LICENSE file in source tree says:
The majority of the source code in the mDNSResponder project is licensed under the terms of the Apache License, Version 2.0, available from:
<http://www.apache.org/licenses/LICENSE-2.0>To accommodate license compatibility with the widest possible range of client code licenses, the shared library code, which is linked at runtime into the same address space as the client using it, is licensed under the terms of the "Three-Clause BSD License".
Quoted 6 lines
Quoted 4 lines
The Linux Name Service Switch code, contributed by National ICT Australia Ltd (NICTA) is licensed under the terms of the NICTA Public Software Licence (which is substantially similar to the "Three-Clause BSD License", with some additional language pertaining to Australian law).
Does this also affect other version like the one in Dunfell?
Yes:
build/tmp/work/cortexa57-poky-linux/mdns/878.270.2-r0/mDNSResponder-878.270.2# cat LICENSE The majority of the source code in the mDNSResponder project is licensed under the terms of the Apache License, Version 2.0, available from:
<http://www.apache.org/licenses/LICENSE-2.0>
To accommodate license compatibility with the widest possible range of client code licenses, the shared library code, which is linked at runtime into the same address space as the client using it, is licensed under the terms of the "Three-Clause BSD License".
The Linux Name Service Switch code, contributed by National ICT Australia Ltd (NICTA) is licensed under the terms of the NICTA Public Software Licence (which is substantially similar to the "Three-Clause BSD License", with some additional language pertaining to Australian law).
-Mikko
Quoted 22 lines
-armin
Quoted 21 lines
Signed-off-by Mikko Rapeli <[email protected]>--- meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-networking/recipes-protocols/mdns/mdns_1096.40.7.bb +1
-1@@ -1,7 +1,7 @@ SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol" DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." HOMEPAGE = "http://developer.apple.com/networking/bonjour/" -LICENSE = "Apache-2.0" +LICENSE = "Apache-2.0 & BSD-3-Clause" LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf" COMPATIBLE_HOST_libc-musl = 'null'