summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.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/0009-Fix-possible-NULL-dereference.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/0009-Fix-possible-NULL-dereference.patch')
-rw-r--r--meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch45
1 files changed, 0 insertions, 45 deletions
diff --git a/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch b/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch
deleted file mode 100644
index 362d69768e..0000000000
--- a/meta-networking/recipes-protocols/mdns/files/0009-Fix-possible-NULL-dereference.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 38cff19781f81586926b02f0fd1cb36c040395e0 Mon Sep 17 00:00:00 2001
2From: Nate Karstens <nate.karstens@garmin.com>
3Date: Thu, 10 Aug 2017 08:21:53 -0500
4Subject: [PATCH 09/11] Fix possible NULL dereference
5
6Fixes a possible NULL dereference if memory for
7the PosixNetworkInterface could not be allocated.
8Other logic seems to prevent dereferencing this
9variable if NULL, but this instance seems to have
10been overlooked.
11
12Upstream-Status: Submitted [dts@apple.com]
13
14Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
15---
16 mDNSPosix/mDNSPosix.c | 11 +++++++----
17 1 file changed, 7 insertions(+), 4 deletions(-)
18
19diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
20index a8a57df..3243ed4 100644
21--- a/mDNSPosix/mDNSPosix.c
22+++ b/mDNSPosix/mDNSPosix.c
23@@ -951,12 +951,15 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct ifi_info *const ifi)
24
25 // If interface is a direct link, address record will be marked as kDNSRecordTypeKnownUnique
26 // and skip the probe phase of the probe/announce packet sequence.
27- intf->coreIntf.DirectLink = mDNSfalse;
28+ if (err == 0)
29+ {
30+ intf->coreIntf.DirectLink = mDNSfalse;
31 #ifdef DIRECTLINK_INTERFACE_NAME
32- if (strcmp(intfName, STRINGIFY(DIRECTLINK_INTERFACE_NAME)) == 0)
33- intf->coreIntf.DirectLink = mDNStrue;
34+ if (strcmp(intfName, STRINGIFY(DIRECTLINK_INTERFACE_NAME)) == 0)
35+ intf->coreIntf.DirectLink = mDNStrue;
36 #endif
37- intf->coreIntf.SupportsUnicastMDNSResponse = mDNStrue;
38+ intf->coreIntf.SupportsUnicastMDNSResponse = mDNStrue;
39+ }
40
41 // The interface is all ready to go, let's register it with the mDNS core.
42 if (err == 0)
43--
442.17.1
45