mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-08-15 03:48:10 +00:00
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>
60 lines
2.0 KiB
Diff
60 lines
2.0 KiB
Diff
From 40ef0241afbb49f84e76afd65eb3ee17466bb582 Mon Sep 17 00:00:00 2001
|
|
From: Nate Karstens <nate.karstens@garmin.com>
|
|
Date: Wed, 28 Jun 2017 17:30:00 -0500
|
|
Subject: [PATCH 2/8] Create subroutine for tearing down an interface
|
|
|
|
Creates a subroutine for tearing down an interface.
|
|
|
|
Upstream-Status: Submitted [dts@apple.com]
|
|
|
|
Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
|
|
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
|
|
---
|
|
mDNSPosix/mDNSPosix.c | 22 ++++++++++++++++------
|
|
1 file changed, 16 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
|
|
index fe7242d83599..a32a880c0ce5 100644
|
|
--- a/mDNSPosix/mDNSPosix.c
|
|
+++ b/mDNSPosix/mDNSPosix.c
|
|
@@ -1043,6 +1043,19 @@ mDNSlocal void FreePosixNetworkInterface(PosixNetworkInterface *intf)
|
|
gRecentInterfaces = intf;
|
|
}
|
|
|
|
+mDNSlocal void TearDownInterface(mDNS *const m, PosixNetworkInterface *intf)
|
|
+{
|
|
+ mDNS_DeregisterInterface(m, &intf->coreIntf, NormalActivation);
|
|
+ if (gMDNSPlatformPosixVerboseLevel > 0) fprintf(stderr, "Deregistered interface %s\n", intf->intfName);
|
|
+ FreePosixNetworkInterface(intf);
|
|
+
|
|
+ num_registered_interfaces--;
|
|
+ if (num_registered_interfaces == 0) {
|
|
+ num_pkts_accepted = 0;
|
|
+ num_pkts_rejected = 0;
|
|
+ }
|
|
+}
|
|
+
|
|
// Grab the first interface, deregister it, free it, and repeat until done.
|
|
mDNSlocal void ClearInterfaceList(mDNS *const m)
|
|
{
|
|
@@ -1051,13 +1064,10 @@ mDNSlocal void ClearInterfaceList(mDNS *const m)
|
|
while (m->HostInterfaces)
|
|
{
|
|
PosixNetworkInterface *intf = (PosixNetworkInterface*)(m->HostInterfaces);
|
|
- mDNS_DeregisterInterface(m, &intf->coreIntf, NormalActivation);
|
|
- if (gMDNSPlatformPosixVerboseLevel > 0) fprintf(stderr, "Deregistered interface %s\n", intf->intfName);
|
|
- FreePosixNetworkInterface(intf);
|
|
+ TearDownInterface(m, intf);
|
|
}
|
|
- num_registered_interfaces = 0;
|
|
- num_pkts_accepted = 0;
|
|
- num_pkts_rejected = 0;
|
|
+
|
|
+ assert(num_registered_interfaces == 0);
|
|
}
|
|
|
|
mDNSlocal int SetupIPv6Socket(int fd)
|
|
--
|
|
2.35.1
|
|
|