summaryrefslogtreecommitdiff
path: root/package/openntpd/patches/patch-ntpd_h
blob: 9189d620479891eeeba7057478b024bcfbac0997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$Id$

	‣ OFFSET_ARRAY_SIZE
	pull in the following diff from MirBSD:
	| Commit ID:      100470A1C1009540C55
	| CVSROOT:        /cvs
	| Module name:    src
	| Changes by:     tg@herc.mirbsd.org      2007/10/08 12:04:34 UTC
	| 
	| Modified files:
	|         usr.sbin/ntpd  : ntpd.h
	| 
	| Log message:
	| reduce the number of probes in the clock filter down to 4, so that adjtime
	| is called at least approx. 3 times a hour, greatly helping us to reduce the
	| size of the spikes for systems with clock drift (but increasing susceptibi-
	| lity to latency-induced low-quality responses)
	| 
	| tested on herc/rant with a value of 3 (adjust about 4 times an hour)
	| 
	| XXX this should be made an ntpd.conf option instead of a define ASAP
	| XXX this should be reverted once we have adjfreq(2)
	but we use 3 here due to employment of adjtimex() which reduces
	usability of older deltas

	‣ SETTIME_MIN_OFFSET
	reduce the minimum required time offset for 'ntpd -s' to
	use settimeofday() instead of adjtime(), in order to provide
	a faster time setting at start, since adjusting can take ages

--- openntpd-3.9p1.orig/ntpd.h	Sun May 14 05:28:58 2006
+++ openntpd-3.9p1/ntpd.h	Mon Oct  8 12:17:58 2007
@@ -55,8 +55,12 @@
 #define	QSCALE_OFF_MAX			0.50
 
 #define	QUERYTIME_MAX		15	/* single query might take n secs max */
-#define	OFFSET_ARRAY_SIZE	8
-#define	SETTIME_MIN_OFFSET	180	/* min offset for settime at start */
+#ifdef USE_ADJTIMEX
+#define	OFFSET_ARRAY_SIZE	3	/* so they get invalidated faster */
+#else
+#define	OFFSET_ARRAY_SIZE	4	/* min. 3, recommended 6, max. 8 */
+#endif
+#define	SETTIME_MIN_OFFSET	12	/* min offset for settime at start */
 #define	SETTIME_TIMEOUT		15	/* max seconds to wait with -s */
 #define	LOG_NEGLIGEE		128	/* negligible drift to not log (ms) */