1 This patch scales down small offsets quadratically. Reduces sensitivity to jitter
3 diff --git a/networking/ntpd.c b/networking/ntpd.c
4 index 4695c33..ac05815 100644
5 --- a/networking/ntpd.c
6 +++ b/networking/ntpd.c
7 @@ -1654,6 +1654,17 @@ update_local_clock(peer_t *p)
9 if (G.offset_to_jitter_ratio >= TIMECONST_HACK_GATE)
13 + double d = p->lastpkt_delay;
14 + if (d > SLEW_THRESHOLD)
17 + if ((abs_offset / d) < 1) {
18 + offset *= (abs_offset / d);
22 tmx.offset = (long)(offset * 1000000); /* usec */
23 if (SLEW_THRESHOLD < STEP_THRESHOLD) {
24 if (tmx.offset > (long)(SLEW_THRESHOLD * 1000000)) {