Skip to content
Permalink
Browse files

busybox: ntpd: increase MIN_FREQHOLD by 3 (backport)

Original commit: 79153cb6bc5a39b00e3c43988a265804ac609837
  • Loading branch information...
Denys Vlasenko authored and RMerl committed May 13, 2019
1 parent 606480b commit 72735e24667d1c4acef5e7c5c3779ee8b41c3bb8
Showing with 3 additions and 3 deletions.
  1. +3 −3 release/src/router/busybox/networking/ntpd.c
@@ -125,7 +125,7 @@
*/

#define INITIAL_SAMPLES 1 /* how many samples do we want for init */
#define MIN_FREQHOLD 10 /* adjust offset, but not freq in this many first adjustments */
#define MIN_FREQHOLD 12 /* adjust offset, but not freq in this many first adjustments */
#define BAD_DELAY_GROWTH 4 /* drop packet if its delay grew by more than this */

#define RETRY_INTERVAL 32 /* on send/recv error, retry in N secs (need to be power of 2) */
@@ -1758,9 +1758,9 @@ update_local_clock(peer_t *p)
//15:31:53.473 update from:<IP> offset:+0.000007 delay:0.158142 jitter:0.010922 clock drift:+9.343ppm tc:6
//15:32:58.902 update from:<IP> offset:-0.000728 delay:0.158222 jitter:0.009454 clock drift:+9.298ppm tc:6
/*
* This expression would choose MIN_FREQHOLD + 7 in the above example.
* This expression would choose MIN_FREQHOLD + 8 in the above example.
*/
G.FREQHOLD_cnt = MIN_FREQHOLD + ((unsigned)(abs(tmx.offset)) >> 16);
G.FREQHOLD_cnt = 1 + MIN_FREQHOLD + ((unsigned)(abs(tmx.offset)) >> 16);
}
G.FREQHOLD_cnt--;
tmx.status |= STA_FREQHOLD;

0 comments on commit 72735e2

Please sign in to comment.
You can’t perform that action at this time.