I think I've found Achim's bug
Eric S. Raymond
esr at thyrsus.com
Tue Jan 15 20:33:35 UTC 2019
ntp_proto, line 518:
if(is_kod(rbufp)) {
if(!memcmp(rbufp->pkt.refid, "RATE", REFIDLEN)) {
peer->selbroken++;
report_event(PEVNT_RATE, peer, NULL);
if (peer->cfg.minpoll < 10) { peer->cfg.minpoll = 10; }
peer->burst = peer->retry = 0;
peer->throttle = (NTP_SHIFT + 1) * (1 << peer->cfg.minpoll);
poll_update(peer, 10);
}
return;
}
Line 522, "if (peer->cfg.minpoll < 10) { peer->cfg.minpoll = 10; }"
looks really dodgy to me. Isn't that permanantly limiting how low
the peer's polling interval can ever go again? If so, it would
neatly explain the behavior Achim is seeing.
The corresponding code in Classic is this:
if (kissCode == RATEKISS) {
peer->selbroken++; /* Increment the KoD count */
report_event(PEVNT_RATE, peer, NULL);
if (pkt->ppoll > peer->minpoll)
peer->minpoll = peer->ppoll;
peer->burst = peer->retry = 0;
peer->throttle = (NTP_SHIFT + 1) * (1 << peer->minpoll);
poll_update(peer, pkt->ppoll);
return; /* kiss-o'-death */
}
which is clearly doing something different.
Daniel, can you explain what you were trying to do here?
My best guess is that the poll_update(peer, 10) call suffices, dynamically
setting a longer poll interval in response to the KOD but allowing
normal poll-interval adaptation afterwards, and line 522
should simply be deleted.
But I'm unsure because I don't compeletly understand designer's intent
for either the normall poll-interval logic or the KOD handling. Hal or
Gary or someone with operational experience should check me here.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
No one who's seen it in action can say the phrase "government help" without
either laughing or crying.
More information about the devel
mailing list