From a97c90e2738b1ef111a1ecb61c2f608565897c47 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Mon, 18 Apr 2005 18:17:20 +0000 Subject: [PATCH] Sync with OpenBSD. The ntpd -s is included now. --- usr.sbin/ntpd/patches/client.c.patch | 17 +---------------- usr.sbin/ntpd/patches/ntp.c.patch | 18 +----------------- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/usr.sbin/ntpd/patches/client.c.patch b/usr.sbin/ntpd/patches/client.c.patch index 0f65215ac5..79afc645cd 100644 --- a/usr.sbin/ntpd/patches/client.c.patch +++ b/usr.sbin/ntpd/patches/client.c.patch @@ -1,4 +1,4 @@ -$DragonFly: src/usr.sbin/ntpd/patches/Attic/client.c.patch,v 1.4 2005/04/14 11:22:16 joerg Exp $ +$DragonFly: src/usr.sbin/ntpd/patches/Attic/client.c.patch,v 1.5 2005/04/18 18:17:20 joerg Exp $ --- client.c 25 Feb 2005 16:43:19 -0000 1.6 +++ client.c 12 Apr 2005 20:13:45 -0000 @@ -20,18 +20,3 @@ $DragonFly: src/usr.sbin/ntpd/patches/Attic/client.c.patch,v 1.4 2005/04/14 11:2 ntp_getmsg(buf, size, &msg); -@@ -228,6 +228,14 @@ - - p->reply[p->shift].offset = ((T2 - T1) + (T3 - T4)) / 2; - p->reply[p->shift].delay = (T4 - T1) - (T3 - T2); -+ if (p->reply[p->shift].delay < 0) { -+ interval = error_interval(); -+ set_next(p, interval); -+ log_info("reply from %s: negative delay %f", -+ log_sockaddr((struct sockaddr *)&p->addr->ss), -+ p->reply[p->shift].delay); -+ return (0); -+ } - p->reply[p->shift].error = (T2 - T1) - (T3 - T4); - p->reply[p->shift].rcvd = time(NULL); - p->reply[p->shift].good = 1; diff --git a/usr.sbin/ntpd/patches/ntp.c.patch b/usr.sbin/ntpd/patches/ntp.c.patch index 1823dbf290..039efcfe3d 100644 --- a/usr.sbin/ntpd/patches/ntp.c.patch +++ b/usr.sbin/ntpd/patches/ntp.c.patch @@ -1,4 +1,4 @@ -$DragonFly: src/usr.sbin/ntpd/patches/Attic/ntp.c.patch,v 1.4 2005/04/14 11:22:16 joerg Exp $ +$DragonFly: src/usr.sbin/ntpd/patches/Attic/ntp.c.patch,v 1.5 2005/04/18 18:17:20 joerg Exp $ --- ntp.c 25 Feb 2005 16:43:19 -0000 1.6 +++ ntp.c 12 Apr 2005 20:13:45 -0000 @@ -21,19 +21,3 @@ $DragonFly: src/usr.sbin/ntpd/patches/Attic/ntp.c.patch,v 1.4 2005/04/14 11:22:1 } int -@@ -454,8 +454,15 @@ - void - priv_settime(double offset) - { -+ struct ntp_peer *p; -+ - imsg_compose(ibuf_main, IMSG_SETTIME, 0, 0, &offset, sizeof(offset)); - conf->settime = 0; -+ -+ TAILQ_FOREACH(p, &conf->ntp_peers, entry) { -+ p->next -= (time_t)offset; -+ p->deadline -= (time_t) offset; -+ } - } - - void -- 2.32.0