summaryrefslogtreecommitdiffstats
path: root/mDNSResponder/mDNSCore/mDNS.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-18 13:13:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-23 18:17:22 +0200
commit0781eb40e2c0905e7b2c5994f5aeef8f51d21e4d (patch)
tree639ede279640e9568f9254fb0887834546c14ed5 /mDNSResponder/mDNSCore/mDNS.c
parentmDNSResponder: Update to v878.250.4 (diff)
downloadrtems-libbsd-0781eb40e2c0905e7b2c5994f5aeef8f51d21e4d.tar.bz2
mDNSResponder: Update to v878.260.1
The sources can be obtained via: https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-878.260.1.tar.gz Update #4010.
Diffstat (limited to 'mDNSResponder/mDNSCore/mDNS.c')
-rwxr-xr-xmDNSResponder/mDNSCore/mDNS.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/mDNSResponder/mDNSCore/mDNS.c b/mDNSResponder/mDNSCore/mDNS.c
index 9e1ac506..bf1bce2f 100755
--- a/mDNSResponder/mDNSCore/mDNS.c
+++ b/mDNSResponder/mDNSCore/mDNS.c
@@ -6092,7 +6092,7 @@ mDNSexport mStatus UpdateKeepaliveRData(mDNS *const m, AuthRecord *rr, NetworkIn
}
if ((intf != mDNSNULL) && (mti.IntfId != intf->InterfaceID))
{
- LogInfo("mDNSPlatformRetrieveTCPInfo: InterfaceID mismatch mti.IntfId = %p InterfaceID = %p", mti.IntfId, intf->InterfaceID);
+ LogInfo("mDNSPlatformRetrieveTCPInfo: InterfaceID mismatch mti.IntfId = %p InterfaceID = %p", mti.IntfId, intf->InterfaceID);
return mStatus_BadParamErr;
}
@@ -6661,6 +6661,7 @@ mDNSlocal void BeginSleepProcessing(mDNS *const m)
NetworkInterfaceInfo *intf;
for (intf = GetFirstActiveInterface(m->HostInterfaces); intf; intf = GetFirstActiveInterface(intf->next))
{
+ mDNSBool skipFullSleepProxyRegistration = mDNSfalse;
// Intialize it to false. These values make sense only when SleepState is set to Sleeping.
intf->SendGoodbyes = 0;
@@ -6687,18 +6688,21 @@ mDNSlocal void BeginSleepProcessing(mDNS *const m)
continue;
}
- // Check if we have already registered with a sleep proxy for this subnet
+ // Check if we have already registered with a sleep proxy for this subnet.
+ // If so, then the subsequent in-NIC sleep proxy registration is limited to any keepalive records that belong
+ // to the interface.
if (skipSameSubnetRegistration(m, registeredIntfIDS, registeredCount, intf->InterfaceID))
{
- LogSPS("%s : Skipping sleep proxy registration on %s", __func__, intf->ifname);
- continue;
+ LogSPS("%s : Skipping full sleep proxy registration on %s", __func__, intf->ifname);
+ skipFullSleepProxyRegistration = mDNStrue;
}
#if APPLE_OSX_mDNSResponder
- else if (SupportsInNICProxy(intf))
+ if (SupportsInNICProxy(intf))
{
mDNSBool keepaliveOnly = mDNSfalse;
- if (ActivateLocalProxy(intf, &keepaliveOnly) == mStatus_NoError)
+ const mStatus err = ActivateLocalProxy(intf, skipFullSleepProxyRegistration, &keepaliveOnly);
+ if (!skipFullSleepProxyRegistration && !err)
{
SendGoodbyesForWakeOnlyService(m, &WakeOnlyService);
@@ -6716,9 +6720,10 @@ mDNSlocal void BeginSleepProcessing(mDNS *const m)
registeredIntfIDS[registeredCount] = intf->InterfaceID;
registeredCount++;
}
+ continue;
}
#endif // APPLE_OSX_mDNSResponder
- else
+ if (!skipFullSleepProxyRegistration)
{
#if APPLE_OSX_mDNSResponder
// If on battery, do not attempt to offload to external sleep proxies