Browse Source

define TRUSTLEVEL_MAX for the trustedlevel value of 10; henning@ ok

OPENBSD_3_7
mickey 19 years ago
parent
commit
a077b10ff0
2 changed files with 4 additions and 3 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/client.c
  2. +2
    -1
      src/usr.sbin/ntpd/ntpd.h

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

@ -1,4 +1,4 @@
/* $OpenBSD: client.c,v 1.46 2004/12/08 15:47:38 mickey Exp $ */
/* $OpenBSD: client.c,v 1.47 2004/12/09 20:24:46 mickey Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -256,7 +256,7 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
p->state = STATE_REPLY_RECEIVED;
/* every received reply which we do not discard increases trust */
if (p->trustlevel < 10) {
if (p->trustlevel < TRUSTLEVEL_MAX) {
if (p->trustlevel < TRUSTLEVEL_BADPEER &&
p->trustlevel + 1 >= TRUSTLEVEL_BADPEER)
log_info("peer %s now valid",


+ 2
- 1
src/usr.sbin/ntpd/ntpd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.h,v 1.46 2004/12/06 20:57:17 mickey Exp $ */
/* $OpenBSD: ntpd.h,v 1.47 2004/12/09 20:24:46 mickey Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -45,6 +45,7 @@
#define TRUSTLEVEL_BADPEER 6
#define TRUSTLEVEL_PATHETIC 2
#define TRUSTLEVEL_AGRESSIVE 8
#define TRUSTLEVEL_MAX 10
#define QSCALE_OFF_MIN 0.05
#define QSCALE_OFF_MAX 0.50


Loading…
Cancel
Save