A recent restart of ntpd using the pool resulted in me
seeing a sixth server in the uk pool returning poll 4.
There is code which clamps ntpd to minpoll for a server
which returns a poll which is less than the client poll.
My way of disabling such servers was to include "restrict
[ip address] ignore" in ntp.conf. Obviously not too
satisfactory as one needs to know about a server before
it can be included in the restrict list.
A couple of days ago it occurred to me that it would be
possible, although unlikely, for a pool client to end up
with all servers returning poll 4 and not being able to
move between minpoll and maxpoll.
The following patch stops ntpd from being clamped at
minpoll. I don't know enough about ntpd to know whether
there are modes which require the clamp but if there
are then a simple
if (some modes)
peer->ppoll = max(peer->minpoll, pkt->ppoll);
should do the job.
The patch works for me using the pool and I have removed the
restrict lines. It doesn't matter how many servers are
misconfigured in this fashion my client will work as designed.
I have read that there are unlikely to any more updates to
ntp-4.2.8 but perhaps this idea can be incorporated into
ntp-4.4 if considered correct and useful.
diff -Naur ntp-4.2.8p17-orig/ntpd/ntp_proto.c ntp-4.2.8p17/ntpd/ntp_proto.c >--- ntp-4.2.8p17-orig/ntpd/ntp_proto.c 2023-06-06 12:33:42.000000000 +0100 >+++ ntp-4.2.8p17/ntpd/ntp_proto.c 2024-04-30 12:11:32.402867197 +0100
@@ -2273,7 +2273,9 @@
sys_badlength++;
return; /* invalid packet poll */
}
+/***
peer->ppoll = max(peer->minpoll, pkt->ppoll);
+***/
if (kissCode == RATEKISS) {
peer->selbroken++; /* Increment the KoD count */
report_event(PEVNT_RATE, peer, NULL);
--
Roger
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)