Browse Source

clamp stratum to NTP_MAXSTRATUM. lingering in my tree for ages. someone likely

deserves to get credited for this, but I have no idea where that came from
OPENBSD_5_0
henning 13 years ago
parent
commit
2d925b01d9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/usr.sbin/ntpd/ntp.c

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

@ -1,4 +1,4 @@
/* $OpenBSD: ntp.c,v 1.114 2009/06/11 17:36:53 henning Exp $ */
/* $OpenBSD: ntp.c,v 1.115 2011/06/16 11:46:55 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -637,6 +637,8 @@ priv_adjtime(void)
conf->status.reftime = gettime();
conf->status.stratum++; /* one more than selected peer */
if (conf->status.stratum > NTP_MAXSTRATUM)
conf->status.stratum = NTP_MAXSTRATUM;
update_scale(offset_median);
conf->status.refid = offsets[i]->status.send_refid;


Loading…
Cancel
Save