summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2022-12-08 21:33:41 +0000
committerKhem Raj <raj.khem@gmail.com>2022-12-09 10:39:27 -0800
commitec96eb577bd518b89e2e7834bd569ba269df458f (patch)
tree318874c6037b3fffedeac7a5fcdb7c9b3cf3f1f1 /meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch
parent19f28fb34e2fa15b30274b97d10b8ecbdafaaf19 (diff)
downloadmeta-openembedded-ec96eb577bd518b89e2e7834bd569ba269df458f.tar.gz
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. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch')
-rw-r--r--meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch53
1 files changed, 0 insertions, 53 deletions
diff --git a/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch b/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch
deleted file mode 100644
index d9adde04c2..0000000000
--- a/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From 9ff06108cd44e84ba6c68bfa6737e793f117e303 Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Thu, 10 Aug 2017 08:46:03 -0500
4Subject: [PATCH] Change a dynamic allocation to file-scope variable
5
6Changes a variable from being dynamically-allocated to being
7statically-allocated at the file scope. Addresses a Coverity
8issue where it appeared that the memory was being leaked.
9
10Upstream-Status: Submitted [dts@apple.com]
11
12Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
13---
14 mDNSPosix/mDNSPosix.c | 14 ++++----------
15 1 file changed, 4 insertions(+), 10 deletions(-)
16
17diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
18index 7aeee7b..2d25016 100755
19--- a/mDNSPosix/mDNSPosix.c
20+++ b/mDNSPosix/mDNSPosix.c
21@@ -81,6 +81,7 @@ static sigset_t gEventSignalSet; // Signals which event loop list
22 static sigset_t gEventSignals; // Signals which were received while inside loop
23
24 static PosixNetworkInterface *gRecentInterfaces;
25+static IfChangeRec gChgRec;
26
27 // ***************************************************************************
28 // Globals (for debugging)
29@@ -1641,18 +1642,11 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context)
30 mDNSlocal mStatus WatchForInterfaceChange(mDNS *const m)
31 {
32 mStatus err;
33- IfChangeRec *pChgRec;
34
35- pChgRec = (IfChangeRec*) mDNSPlatformMemAllocateClear(sizeof *pChgRec);
36- if (pChgRec == NULL)
37- return mStatus_NoMemoryErr;
38-
39- pChgRec->mDNS = m;
40- err = OpenIfNotifySocket(&pChgRec->NotifySD);
41+ gChgRec.mDNS = m;
42+ err = OpenIfNotifySocket(&gChgRec.NotifySD);
43 if (err == 0)
44- err = mDNSPosixAddFDToEventLoop(pChgRec->NotifySD, InterfaceChangeCallback, pChgRec);
45- if (err)
46- mDNSPlatformMemFree(pChgRec);
47+ err = mDNSPosixAddFDToEventLoop(gChgRec.NotifySD, InterfaceChangeCallback, &gChgRec);
48
49 return err;
50 }
51--
522.20.1
53