diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-14 20:16:32 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-14 20:16:32 +0000 |
commit | af269e45b655d42d9dec4a8a6abab8572f4ef3a9 (patch) | |
tree | 8a1605b508ec52f2e5e443446b3aede6a372093a /usr.sbin/ntpd/ntp.c | |
parent | 0c7878c6dee2f38874f425806185365fe2610622 (diff) |
do not do the stratum guessing dance.
stratum is pretty much pointless anyway these days, and we certainly
do not want to send out illegal packets (stratum=0) until synced...
Diffstat (limited to 'usr.sbin/ntpd/ntp.c')
-rw-r--r-- | usr.sbin/ntpd/ntp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c index ac537634d88..efeddd56a18 100644 --- a/usr.sbin/ntpd/ntp.c +++ b/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.23 2004/07/13 19:41:26 alexander Exp $ */ +/* $OpenBSD: ntp.c,v 1.24 2004/07/14 20:16:31 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -281,7 +281,7 @@ ntp_adjtime(struct ntpd_conf *conf) { struct ntp_peer *p; double offset_median = 0; - int offset_cnt = 0, stratum = 254; + int offset_cnt = 0; TAILQ_FOREACH(p, &conf->ntp_peers, entry) { if (!p->update.good) @@ -297,9 +297,6 @@ ntp_adjtime(struct ntpd_conf *conf) offset_median += p->update.offset; offset_cnt++; - - if (p->update.status.stratum < stratum) - stratum = p->update.status.stratum; /* XXX */ } if (offset_cnt > 0) { @@ -308,7 +305,6 @@ ntp_adjtime(struct ntpd_conf *conf) &offset_median, sizeof(offset_median)); conf->status.reftime = gettime(); - conf->status.stratum = stratum + 1; conf->status.leap = LI_NOWARNING; /* XXX */ } } |