Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/apache2/mDNSResponder/dist/mDNSCore If scheduling a...



details:   https://anonhg.NetBSD.org/src/rev/126d9c720f29
branches:  trunk
changeset: 811185:126d9c720f29
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Oct 15 10:29:57 2015 +0000

description:
If scheduling a probe or response is in the past or exactly now, schedule
it for now + 1 to avoid log file spam about not all probes being sent.

diffstat:

 external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 70f326d0f443 -r 126d9c720f29 external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c
--- a/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c       Thu Oct 15 10:24:33 2015 +0000
+++ b/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c       Thu Oct 15 10:29:57 2015 +0000
@@ -687,14 +687,18 @@
                // If (rr->LastAPTime + rr->ThisAPInterval) happens to be far in the past, we don't want to allow
                // NextScheduledProbe to be set excessively in the past, because that can cause bad things to happen.
                // See: <rdar://problem/7795434> mDNS: Sometimes advertising stops working and record interval is set to zero
-               if (m->NextScheduledProbe - m->timenow < 0)
-                       m->NextScheduledProbe = m->timenow;
+               // A future time also needs to be set to avoid spamming logs about not all probes being sent.
+               if (m->NextScheduledProbe - m->timenow <= 0)
+                       m->NextScheduledProbe = m->timenow + 1;
                }
        else if (rr->AnnounceCount && (ResourceRecordIsValidAnswer(rr) || rr->resrec.RecordType == kDNSRecordTypeDeregistering))
                {
                if (m->NextScheduledResponse - (rr->LastAPTime + rr->ThisAPInterval) >= 0)
                        m->NextScheduledResponse = (rr->LastAPTime + rr->ThisAPInterval);
                }
+               // A future time also needs to be set to avoid spamming logs about not all responses being sent.
+               if (m->NextScheduledResponse - m->timenow <= 0)
+                       m->NextScheduledResponse = m->timenow + 1;
        }
 
 mDNSlocal void InitializeLastAPTime(mDNS *const m, AuthRecord *const rr)



Home | Main Index | Thread Index | Old Index