Browse Source

If ntpd decides the clock has become unsynced, reset the number of saved

time corrections. Once the clock is synced again, start computing a fresh
frequency correction.
ok henning
OPENBSD_4_6
ckuethe 15 years ago
parent
commit
f86c299c09
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/usr.sbin/ntpd/ntp.c

+ 4
- 2
src/usr.sbin/ntpd/ntp.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntp.c,v 1.112 2009/06/06 18:14:25 pyr Exp $ */
/* $OpenBSD: ntp.c,v 1.113 2009/06/06 18:47:19 ckuethe Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -527,8 +527,10 @@ priv_adjfreq(double offset)
{
double curtime, freq;
if (!conf->status.synced)
if (!conf->status.synced){
conf->freq.samples = 0;
return;
}
if (conf->filters & FILTER_ADJFREQ){
conf->filters &= ~FILTER_ADJFREQ;


Loading…
Cancel
Save