On Sat, 4 Feb 2017 10:09:11 +0000, David Woolley
<david@ex.djwhome.demon.invalid> wrote:

>On 03/02/17 23:10, Robert Scott wrote:
>>  But with other servers, the first
>> response came back good, the second response came back LI=3, the third
>> and fourth responses never came back at all.  (recvfrom() has to be
>> aborted).
>>
>> Is this possibly a defense mechanism against a DOS attack?
>
>
>See <https://www.eecis.udel.edu/~mills/ntp/html/rate.html>, in 
>particular the section on Kiss-of-Death.  Your code should be 
>recognizing these and raising an alarm.

My code does parse for the Kiss-of-Death codes.  And when it gets it,
it will not query that host again.  But my code checks for LI=3 first,
and if it gets that, it does not check further because my response to
LI=3 is the same as my response to KOD.  I do not query that host
again.  The only reason I was querying those hosts again is because of
the bug in my code that prevented my looping through all four hosts.
So I thought I was accessing a different host when in fact I was
accessing the same host four times.  Since I fixed that bug, I don't
think I will be getting LI=3 very often.  But if I do, I will treat it
the same as the KOD.

By the way, the code I am writing is not part of a NTP algorithm to
adjust a system clock for time.  It is for a one-time frequency
calibration of an oscillator.  I take a time snapshot at the beginning
and at the end of an approximately six hour period during which I am
counting cycles from the oscillator in question.  I hope to achieve a
frequency accuracy of 5 PPM.  Once that measurement is made, I store
it for subsequent use in my app.  Unless the hardware changes, there
is no need to do the calibration again.

-Robert Scott
 Hopkins, MN

_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to