Browse Source

Esape from the Mouth of Madness by adjusting stored sensor offsets

when we adjust time. This prevents ntpd from going wild when using
sensor time sources; ok henning@ (on an earlier version) and a LOT
of testing by naddy@
OPENBSD_4_1
otto 18 years ago
parent
commit
4116dad0a1
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/usr.sbin/ntpd/ntp.c

+ 6
- 1
src/usr.sbin/ntpd/ntp.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntp.c,v 1.96 2006/12/20 16:50:13 henning Exp $ */
/* $OpenBSD: ntp.c,v 1.97 2007/01/14 19:20:09 otto Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -564,6 +564,11 @@ priv_adjtime(void)
p->reply[i].offset -= offset_median;
p->update.good = 0;
}
TAILQ_FOREACH(s, &conf->ntp_sensors, entry) {
for (i = 0; i < SENSOR_OFFSETS; i++)
s->offsets[i].offset -= offset_median;
s->update.offset -= offset_median;
}
return (0);
}


Loading…
Cancel
Save