diff --git a/ntp_core.c b/ntp_core.c index d2ba6d8..39dc02f 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -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 */ diff --git a/srcparams.h b/srcparams.h index 19eadcf..4e01d3b 100644 --- a/srcparams.h +++ b/srcparams.h @@ -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