]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Disable maxdelayratio test by default
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 12 Aug 2011 13:34:11 +0000 (15:34 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 12 Aug 2011 13:38:05 +0000 (15:38 +0200)
Change default maxdelayratio from 16384.0 to 0.0. A value larger
than 1.0 is required to enable the test.

ntp_core.c
srcparams.h

index d2ba6d88d2b3e637de544b4307a98101bf246715..39dc02f39b11c248e27087025af318fffeabcd28 100644 (file)
@@ -932,7 +932,8 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
      round trip delay to the minimum one currently in the stats data
      register is less than an administrator-defined value */
 
-  if (fabs(delta/SRC_MinRoundTripDelay(inst->source)) > inst->max_delay_ratio) {
+  if (inst->max_delay_ratio > 1.0 &&
+      fabs(delta/SRC_MinRoundTripDelay(inst->source)) > inst->max_delay_ratio) {
     test4b = 0; /* Failed */
   } else {
     test4b = 1; /* Success */
index 19eadcf906c59edb439c300831b0e1eb741e8731..4e01d3b0d9fbbb9606f0ac38e1a89f83a551e55b 100644 (file)
@@ -50,7 +50,7 @@ typedef struct {
 #define SRC_DEFAULT_MAXPOLL 10
 #define SRC_DEFAULT_PRESEND_MINPOLL 0
 #define SRC_DEFAULT_MAXDELAY 16.0
-#define SRC_DEFAULT_MAXDELAYRATIO 16384.0
+#define SRC_DEFAULT_MAXDELAYRATIO 0.0
 #define SRC_DEFAULT_MAXDELAYDEVRATIO 10.0
 #define SRC_DEFAULT_MINSTRATUM 0
 #define SRC_DEFAULT_POLLTARGET 6