1
0

patch-ntpd_h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. $Id$
  2. ‣ OFFSET_ARRAY_SIZE
  3. pull in the following diff from MirBSD:
  4. | Commit ID: 100470A1C1009540C55
  5. | CVSROOT: /cvs
  6. | Module name: src
  7. | Changes by: tg@herc.mirbsd.org 2007/10/08 12:04:34 UTC
  8. |
  9. | Modified files:
  10. | usr.sbin/ntpd : ntpd.h
  11. |
  12. | Log message:
  13. | reduce the number of probes in the clock filter down to 4, so that adjtime
  14. | is called at least approx. 3 times a hour, greatly helping us to reduce the
  15. | size of the spikes for systems with clock drift (but increasing susceptibi-
  16. | lity to latency-induced low-quality responses)
  17. |
  18. | tested on herc/rant with a value of 3 (adjust about 4 times an hour)
  19. |
  20. | XXX this should be made an ntpd.conf option instead of a define ASAP
  21. | XXX this should be reverted once we have adjfreq(2)
  22. but we use 3 here due to employment of adjtimex() which reduces
  23. usability of older deltas
  24. ‣ SETTIME_MIN_OFFSET
  25. reduce the minimum required time offset for 'ntpd -s' to
  26. use settimeofday() instead of adjtime(), in order to provide
  27. a faster time setting at start, since adjusting can take ages
  28. --- openntpd-3.9p1.orig/ntpd.h 2006-05-14 07:29:21.000000000 +0200
  29. +++ openntpd-3.9p1/ntpd.h 2010-07-02 14:13:10.357356688 +0200
  30. @@ -55,8 +55,12 @@
  31. #define QSCALE_OFF_MAX 0.50
  32. #define QUERYTIME_MAX 15 /* single query might take n secs max */
  33. -#define OFFSET_ARRAY_SIZE 8
  34. -#define SETTIME_MIN_OFFSET 180 /* min offset for settime at start */
  35. +#ifdef USE_ADJTIMEX
  36. +#define OFFSET_ARRAY_SIZE 3 /* so they get invalidated faster */
  37. +#else
  38. +#define OFFSET_ARRAY_SIZE 4 /* min. 3, recommended 6, max. 8 */
  39. +#endif
  40. +#define SETTIME_MIN_OFFSET 12 /* min offset for settime at start */
  41. #define SETTIME_TIMEOUT 15 /* max seconds to wait with -s */
  42. #define LOG_NEGLIGEE 128 /* negligible drift to not log (ms) */
  43. @@ -131,6 +135,7 @@ struct ntpd_conf {
  44. u_int8_t listen_all;
  45. u_int8_t settime;
  46. u_int8_t debug;
  47. + u_int8_t ignore;
  48. u_int32_t scale;
  49. };