[ntp:questions] Facing some issue in the ntp version Ver. 4.2.6p1
Brian Utterback
brian.utterback at oracle.com
Mon Jul 23 13:01:35 UTC 2012
That section of code is examining the root distance, which is the error
introduced by the number of hops between this system and the ultimate
source of time in this NTP network, i.e. the current root refclock. If
the root distance is too large, we reject the source and flag it as
failing test11. If the source of time we are examining is not a peer at
all, but is instead a refclock itself, then by definition the root
distance is 0 and therefore it cannot fail this test.
On 7/23/2012 7:42 AM, bhargav p wrote:
>> Hi,
>>
>> Can anyone explain me this part of code in ntp_proto.c:
>>
>>
>> /*
>>
>> * A distance error for a remote peer occurs if the root
>>
>> * distance is greater than or equal to the distance threshold
>>
>> * plus the increment due to one host poll interval.
>>
>> */
>>
>> if (!(peer->flags & FLAG_REFCLOCK) && root_distance(peer) >=
>>
>> sys_maxdist + clock_phi * ULOGTOD(peer->hpoll))
>>
>> rval |= TEST11; /* distance exceeded */
>>
>>
>> why we are checking the peer->flags & FLAG_REFCLOCK ?
>>
>>
>> -Bhargav
>> lists.ntp.org/listinfo/questions
More information about the questions
mailing list