mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-08-14 03:37:30 +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>
59 lines
2.7 KiB
Diff
59 lines
2.7 KiB
Diff
From beab76b5708862f44d9acbe7a92db45e2f99259f Mon Sep 17 00:00:00 2001
|
|
From: Nate Karstens <nate.karstens@garmin.com>
|
|
Date: Tue, 1 Aug 2017 17:06:01 -0500
|
|
Subject: [PATCH 4/8] Indicate loopback interface to mDNS core
|
|
|
|
Tells the mDNS core if an interface is a loopback interface,
|
|
similar to AddInterfaceToList() in the MacOS implementation.
|
|
|
|
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 | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
|
|
index 9a5b4d7ea4cb..02a19b438e03 100644
|
|
--- a/mDNSPosix/mDNSPosix.c
|
|
+++ b/mDNSPosix/mDNSPosix.c
|
|
@@ -1348,7 +1348,7 @@ mDNSlocal void CleanRecentInterfaces(void)
|
|
// 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 mDNSu8 *intfHaddr, mDNSu16 intfHlen, const char *intfName, int intfIndex)
|
|
+ const mDNSu8 *intfHaddr, mDNSu16 intfHlen, const char *intfName, int intfIndex, int intfFlags)
|
|
{
|
|
int err = 0;
|
|
PosixNetworkInterface *intf;
|
|
@@ -1411,6 +1411,7 @@ mDNSlocal int SetupOneInterface(mDNS *const m, struct sockaddr *intfAddr, struct
|
|
|
|
intf->coreIntf.Advertise = m->AdvertiseLocalAddresses;
|
|
intf->coreIntf.McastTxRx = mDNStrue;
|
|
+ intf->coreIntf.Loopback = ((intfFlags & IFF_LOOPBACK) != 0) ? mDNStrue : mDNSfalse;
|
|
|
|
// Set up the extra fields in PosixNetworkInterface.
|
|
assert(intf->intfName != NULL); // intf->intfName already set up above
|
|
@@ -1561,7 +1562,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
|
|
}
|
|
#endif
|
|
if (SetupOneInterface(m, i->ifa_addr, i->ifa_netmask,
|
|
- hwaddr, hwaddr_len, i->ifa_name, ifIndex) == 0)
|
|
+ hwaddr, hwaddr_len, i->ifa_name, ifIndex, i->ifa_flags) == 0)
|
|
{
|
|
if (i->ifa_addr->sa_family == AF_INET)
|
|
foundav4 = mDNStrue;
|
|
@@ -1578,7 +1579,7 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
|
|
// if ((m->HostInterfaces == NULL) && (firstLoopback != NULL))
|
|
if (!foundav4 && firstLoopback)
|
|
(void) SetupOneInterface(m, firstLoopback->ifa_addr, firstLoopback->ifa_netmask,
|
|
- NULL, 0, firstLoopback->ifa_name, firstLoopbackIndex);
|
|
+ NULL, 0, firstLoopback->ifa_name, firstLoopbackIndex, firstLoopback->ifa_flags);
|
|
}
|
|
|
|
// Clean up.
|
|
--
|
|
2.35.1
|
|
|