aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-01 22:23:27 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-01 22:23:27 +0100
commita9aaeda0e9714eec74894734b30b6f5a45c97a48 (patch)
tree3b410ffd2f5c87a38f59d0e91e2ffa5b2f2eac88 /networking
parente4844b8a5fb0159281dbdbace333f69f6d3f1b4b (diff)
downloadbusybox-w32-a9aaeda0e9714eec74894734b30b6f5a45c97a48.tar.gz
busybox-w32-a9aaeda0e9714eec74894734b30b6f5a45c97a48.tar.bz2
busybox-w32-a9aaeda0e9714eec74894734b30b6f5a45c97a48.zip
ntpd: restore forgotten delay sanitization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/ntpd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 02761b3d4..5431b7499 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -1403,6 +1403,8 @@ recv_and_process_peer_pkt(peer_t *p)
1403 * the delay is clamped not less than the system precision. 1403 * the delay is clamped not less than the system precision.
1404 */ 1404 */
1405 p->lastpkt_delay = (T4 - T1) - (T3 - T2); 1405 p->lastpkt_delay = (T4 - T1) - (T3 - T2);
1406 if (p->lastpkt_delay < G_precision_sec)
1407 p->lastpkt_delay = G_precision_sec;
1406 datapoint->d_dispersion = LOG2D(msg.m_precision_exp) + G_precision_sec; 1408 datapoint->d_dispersion = LOG2D(msg.m_precision_exp) + G_precision_sec;
1407 if (!p->p_reachable_bits) { 1409 if (!p->p_reachable_bits) {
1408 /* 1st datapoint ever - replicate offset in every element */ 1410 /* 1st datapoint ever - replicate offset in every element */