summaryrefslogtreecommitdiffhomepage
path: root/networking
diff options
context:
space:
mode:
authorMiroslav Lichvar <mlichvar@redhat.com>2014-09-18 16:19:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2014-09-24 15:21:18 +0200
commitfb143f783da8a3b13ae7a35f6750c2d0c86081e6 (patch)
tree999fa5848b235028978e0a4f3e610e8191cbb664 /networking
parent0f78d616cb394925d8b9511d370643ddd445adc3 (diff)
ntpd: don't wait for good offset before disabling burst mode
The burst mode needs to be stopped even when no replies are received. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/ntpd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c
index cfe695631..3c708c1c5 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -1472,12 +1472,6 @@ update_local_clock(peer_t *p)
} else { /* abs_offset <= STEP_THRESHOLD */
- if (G.poll_exp < MINPOLL && G.initial_poll_complete) {
- VERB4 bb_error_msg("small offset:%+f, disabling burst mode", offset);
- G.polladj_count = 0;
- G.poll_exp = MINPOLL;
- }
-
/* Compute the clock jitter as the RMS of exponentially
* weighted offset differences. Used by the poll adjust code.
*/
@@ -2242,6 +2236,9 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv)
if (p->p_fd == -1) {
/* Time to send new req */
if (--cnt == 0) {
+ VERB4 bb_error_msg("disabling burst mode");
+ G.polladj_count = 0;
+ G.poll_exp = MINPOLL;
G.initial_poll_complete = 1;
}
send_query_to_peer(p);