summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ntpd/client.c4
-rw-r--r--usr.sbin/ntpd/ntpd.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c
index fc71fd641ea..94a8613ad01 100644
--- a/usr.sbin/ntpd/client.c
+++ b/usr.sbin/ntpd/client.c
@@ -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",
diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h
index 120ecabd0f0..19168fe9578 100644
--- a/usr.sbin/ntpd/ntpd.h
+++ b/usr.sbin/ntpd/ntpd.h
@@ -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