summaryrefslogtreecommitdiff
path: root/package/openntpd/patches/patch-ntpd_h
blob: 6cf64776ca1ef4c3659d44479343c3bc89bcd1f4 (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
48
49
50
51
52
53
54
55
$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	2006-05-14 07:29:21.000000000 +0200
+++ openntpd-3.9p1/ntpd.h	2010-07-02 14:13:10.357356688 +0200
@@ -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) */
 
@@ -131,6 +135,7 @@ struct ntpd_conf {
 	u_int8_t				listen_all;
 	u_int8_t				settime;
 	u_int8_t				debug;
+	u_int8_t				ignore;
 	u_int32_t				scale;
 };