How NTP works
hmurray at megapathdsl.net
Fri Nov 25 18:54:21 UTC 2016
> That's the 'reftime' field in struct pkt. Grepping, I find...that it really
> *doesn't* seem to be used. But verifying this is confusing because there
> are other variables with reftime in their names. You should both check me
> on it.
We should scan ntp classic in case we botched something.
I took a look at the RFC. The only use I saw was on page 83 as part of a
sanity check filter.
* Verify valid root distance.
if (r->rootdelay / 2 + r->rootdisp >= MAXDISP || p->reftime >
return; /* invalid header values */
The MAXDISP above turns into sys_maxdisp in the code.
This looks like the corresponding code:
if(scalbn((double)pkt->rootdelay/2.0 + (double)pkt->rootdisp, -16) >=
peer->flash |= BOGON7;
I don't see the reftime check.
These are my opinions. I hate spam.
More information about the devel