Browse Source

don't log every single reply we receive and log local clock adjustemt nicer

OPENBSD_3_6
henning 20 years ago
parent
commit
d6f04943b0
2 changed files with 3 additions and 7 deletions
  1. +1
    -5
      src/usr.sbin/ntpd/client.c
  2. +2
    -2
      src/usr.sbin/ntpd/ntpd.c

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

@ -1,4 +1,4 @@
/* $OpenBSD: client.c,v 1.14 2004/07/07 06:51:16 deraadt Exp $ */
/* $OpenBSD: client.c,v 1.15 2004/07/07 06:57:13 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -151,10 +151,6 @@ client_dispatch(struct ntp_peer *p)
p->deadline = 0;
p->state = STATE_REPLY_RECEIVED;
log_debug("reply received from %s: offset %f delay %f",
log_sockaddr((struct sockaddr *)&fsa), p->reply[p->shift].offset,
p->reply[p->shift].delay);
/* every received reply which we do not discard increases trust */
if (p->trustlevel < 10) {
if (p->trustlevel < TRUSTLEVEL_BADPEER &&


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

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.c,v 1.6 2004/07/05 07:46:16 henning Exp $ */
/* $OpenBSD: ntpd.c,v 1.7 2004/07/07 06:57:13 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -265,7 +265,7 @@ ntpd_adjtime(double d)
struct timeval tv;
d_to_tv(d, &tv);
log_debug("calling adjtime, offset=%fs", d);
log_info("adjusting local clock by %fs", d);
if (adjtime(&tv, NULL) == -1)
log_warn("adjtime failed");
}

Loading…
Cancel
Save