[git commit] ntpd: Raise MAXDIST to 3s for better tolerance and consistency with chrony

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 1 11:30:40 UTC 2025


commit: https://git.busybox.net/busybox/commit/?id=73c67d75ef6197a5e722ea1f19c30fa79f4de569
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

function                                             old     new   delta
select_and_cluster                                  1088    1093      +5

Signed-off-by: Michael Glembotzki <m.glembo at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/ntpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/networking/ntpd.c b/networking/ntpd.c
index dcbdb8e60..4c4842cb2 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -205,7 +205,7 @@
 #define MINDISP         0.01    /* minimum dispersion (sec) */
 #define MAXDISP         16      /* maximum dispersion (sec) */
 #define MAXSTRAT        16      /* maximum stratum (infinity metric) */
-#define MAXDIST         1       /* distance threshold (sec) */
+#define MAXDIST         3       /* distance threshold (sec): do not use peers who are farther away */
 #define MIN_SELECTED    1       /* minimum intersection survivors */
 #define MIN_CLUSTERED   3       /* minimum cluster survivors */
 


More information about the busybox-cvs mailing list