summaryrefslogtreecommitdiff
path: root/package/openntpd/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-03-29 18:40:10 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2015-03-29 18:54:25 +0200
commitc8b0570ff50361cea669085e504be7131cf35e7c (patch)
treee461f09ac921d81d07b040fd0af46f855036e639 /package/openntpd/patches
parentcb204c16bb2d9d0fe3841ead1be672e14d6d3261 (diff)
update to latest upstream version
Diffstat (limited to 'package/openntpd/patches')
-rw-r--r--package/openntpd/patches/patch-client_c17
-rw-r--r--package/openntpd/patches/patch-configure_ac18
-rw-r--r--package/openntpd/patches/patch-defines_h17
-rw-r--r--package/openntpd/patches/patch-ntpd_c27
-rw-r--r--package/openntpd/patches/patch-ntpd_h55
-rw-r--r--package/openntpd/patches/patch-openbsd-compat_Makefile_in15
-rw-r--r--package/openntpd/patches/patch-openbsd-compat_openbsd-compat_h18
-rw-r--r--package/openntpd/patches/patch-server_c40
8 files changed, 0 insertions, 207 deletions
diff --git a/package/openntpd/patches/patch-client_c b/package/openntpd/patches/patch-client_c
deleted file mode 100644
index 37c0c89a7..000000000
--- a/package/openntpd/patches/patch-client_c
+++ /dev/null
@@ -1,17 +0,0 @@
-$Id$
-
- bugfix from MirBSD ntpd: do not hardcode the number
- of required adjustment offsets, use the constant
- instead, MirOS commitid 10047041D2145A88E16
-
---- openntpd-3.9p1.orig/client.c Sun May 14 05:28:58 2006
-+++ openntpd-3.9p1/client.c Mon Oct 8 12:08:30 2007
-@@ -314,7 +314,7 @@ client_update(struct ntp_peer *p)
- best = i;
- }
-
-- if (good < 8)
-+ if (good < OFFSET_ARRAY_SIZE)
- return (-1);
-
- memcpy(&p->update, &p->reply[best], sizeof(p->update));
diff --git a/package/openntpd/patches/patch-configure_ac b/package/openntpd/patches/patch-configure_ac
deleted file mode 100644
index aa98cb71d..000000000
--- a/package/openntpd/patches/patch-configure_ac
+++ /dev/null
@@ -1,18 +0,0 @@
-$Id$
-
- part of the "adjtime-linux" patch
-
---- openntpd-3.9p1.orig/configure.ac 2006-05-14 05:29:23.000000000 +0000
-+++ openntpd-3.9p1/configure.ac 2007-01-28 20:49:48.000000000 +0000
-@@ -617,6 +617,11 @@ else
- fi
- AC_SUBST(mansubdir)
-
-+AC_ARG_WITH(adjtimex,
-+ [ --with-adjtimex Use adjtimex to adjust kernel skew],
-+ [ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ]
-+)
-+
- # Search for OpenSSL if required.
- if test "$ac_cv_func_arc4random" != "yes" && test "x$builtin_arc4random" != "xyes"; then
- saved_CPPFLAGS="$CPPFLAGS"
diff --git a/package/openntpd/patches/patch-defines_h b/package/openntpd/patches/patch-defines_h
deleted file mode 100644
index 9e2b35bf1..000000000
--- a/package/openntpd/patches/patch-defines_h
+++ /dev/null
@@ -1,17 +0,0 @@
-$Id$
-
- part of the "adjtime-linux" patch
-
---- openntpd-3.9p1.orig/defines.h 2006-05-14 05:29:21.000000000 +0000
-+++ openntpd-3.9p1/defines.h 2007-01-28 20:49:48.000000000 +0000
-@@ -20,6 +20,10 @@
- # define setproctitle(x)
- #endif
-
-+#ifdef USE_ADJTIMEX
-+# define adjtime(a,b) (_compat_adjtime((a),(b)))
-+#endif
-+
- #if !defined(SA_LEN)
- # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
- # define SA_LEN(x) ((x)->sa_len)
diff --git a/package/openntpd/patches/patch-ntpd_c b/package/openntpd/patches/patch-ntpd_c
deleted file mode 100644
index 0841ca4e9..000000000
--- a/package/openntpd/patches/patch-ntpd_c
+++ /dev/null
@@ -1,27 +0,0 @@
---- openntpd-3.9p1.orig/ntpd.c 2006-05-14 07:29:23.000000000 +0200
-+++ openntpd-3.9p1/ntpd.c 2010-07-02 14:21:47.473356095 +0200
-@@ -73,7 +73,7 @@ usage(void)
- {
- extern char *__progname;
-
-- fprintf(stderr, "usage: %s [-dSs] [-f file]\n", __progname);
-+ fprintf(stderr, "usage: %s [-diSs] [-f file]\n", __progname);
- exit(1);
- }
-
-@@ -100,11 +100,14 @@ main(int argc, char *argv[])
- log_init(1); /* log to stderr until daemonized */
- res_init(); /* XXX */
-
-- while ((ch = getopt(argc, argv, "df:sS")) != -1) {
-+ while ((ch = getopt(argc, argv, "dif:sS")) != -1) {
- switch (ch) {
- case 'd':
- conf.debug = 1;
- break;
-+ case 'i':
-+ conf.ignore = 1;
-+ break;
- case 'f':
- conffile = optarg;
- break;
diff --git a/package/openntpd/patches/patch-ntpd_h b/package/openntpd/patches/patch-ntpd_h
deleted file mode 100644
index 6cf64776c..000000000
--- a/package/openntpd/patches/patch-ntpd_h
+++ /dev/null
@@ -1,55 +0,0 @@
-$Id$
-
- ‣ OFFSET_ARRAY_SIZE
- pull in the following diff from MirBSD:
- | Commit ID: 100470A1C1009540C55
- | CVSROOT: /cvs
- | Module name: src
- | Changes by: tg@herc.mirbsd.org 2007/10/08 12:04:34 UTC
- |
- | Modified files:
- | usr.sbin/ntpd : ntpd.h
- |
- | Log message:
- | reduce the number of probes in the clock filter down to 4, so that adjtime
- | is called at least approx. 3 times a hour, greatly helping us to reduce the
- | size of the spikes for systems with clock drift (but increasing susceptibi-
- | lity to latency-induced low-quality responses)
- |
- | tested on herc/rant with a value of 3 (adjust about 4 times an hour)
- |
- | XXX this should be made an ntpd.conf option instead of a define ASAP
- | XXX this should be reverted once we have adjfreq(2)
- but we use 3 here due to employment of adjtimex() which reduces
- usability of older deltas
-
- ‣ SETTIME_MIN_OFFSET
- reduce the minimum required time offset for 'ntpd -s' to
- use settimeofday() instead of adjtime(), in order to provide
- a faster time setting at start, since adjusting can take ages
-
---- openntpd-3.9p1.orig/ntpd.h 2006-05-14 07:29:21.000000000 +0200
-+++ openntpd-3.9p1/ntpd.h 2010-07-02 14:13:10.357356688 +0200
-@@ -55,8 +55,12 @@
- #define QSCALE_OFF_MAX 0.50
-
- #define QUERYTIME_MAX 15 /* single query might take n secs max */
--#define OFFSET_ARRAY_SIZE 8
--#define SETTIME_MIN_OFFSET 180 /* min offset for settime at start */
-+#ifdef USE_ADJTIMEX
-+#define OFFSET_ARRAY_SIZE 3 /* so they get invalidated faster */
-+#else
-+#define OFFSET_ARRAY_SIZE 4 /* min. 3, recommended 6, max. 8 */
-+#endif
-+#define SETTIME_MIN_OFFSET 12 /* min offset for settime at start */
- #define SETTIME_TIMEOUT 15 /* max seconds to wait with -s */
- #define LOG_NEGLIGEE 128 /* negligible drift to not log (ms) */
-
-@@ -131,6 +135,7 @@ struct ntpd_conf {
- u_int8_t listen_all;
- u_int8_t settime;
- u_int8_t debug;
-+ u_int8_t ignore;
- u_int32_t scale;
- };
-
diff --git a/package/openntpd/patches/patch-openbsd-compat_Makefile_in b/package/openntpd/patches/patch-openbsd-compat_Makefile_in
deleted file mode 100644
index c2660e499..000000000
--- a/package/openntpd/patches/patch-openbsd-compat_Makefile_in
+++ /dev/null
@@ -1,15 +0,0 @@
-$Id$
-
- part of the "adjtime-linux" patch
-
---- openntpd-3.9p1.orig/openbsd-compat/Makefile.in 2006-05-14 05:29:19.000000000 +0000
-+++ openntpd-3.9p1/openbsd-compat/Makefile.in 2007-01-28 20:49:48.000000000 +0000
-@@ -9,7 +9,7 @@ OPENBSD= asprintf.o daemon.o errx.o inet
- COMPAT= atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \
- bsd-snprintf.o bsd-getifaddrs.o bsd-setresuid.o \
- bsd-setresgid.o fake-rfc2553.o
--PORT= port-qnx.o
-+PORT= port-linux.o port-qnx.o
-
- VPATH=@srcdir@
- CC=@CC@
diff --git a/package/openntpd/patches/patch-openbsd-compat_openbsd-compat_h b/package/openntpd/patches/patch-openbsd-compat_openbsd-compat_h
deleted file mode 100644
index cdc7cc679..000000000
--- a/package/openntpd/patches/patch-openbsd-compat_openbsd-compat_h
+++ /dev/null
@@ -1,18 +0,0 @@
-$Id$
-
- part of the "adjtime-linux" patch
-
---- openntpd-3.9p1.orig/openbsd-compat/openbsd-compat.h 2006-05-14 05:29:19.000000000 +0000
-+++ openntpd-3.9p1/openbsd-compat/openbsd-compat.h 2007-01-28 20:49:48.000000000 +0000
-@@ -46,6 +46,11 @@ int asprintf(char **, const char *,
- __attribute__((__format__ (printf, 2, 3)));
- #endif
-
-+#ifdef USE_ADJTIMEX
-+# include <sys/time.h>
-+int _compat_adjtime(const struct timeval *, struct timeval *);
-+#endif
-+
- #ifndef HAVE_INET_PTON
- int inet_pton(int, const char *, void *);
- #endif
diff --git a/package/openntpd/patches/patch-server_c b/package/openntpd/patches/patch-server_c
deleted file mode 100644
index ae1614afa..000000000
--- a/package/openntpd/patches/patch-server_c
+++ /dev/null
@@ -1,40 +0,0 @@
---- openntpd-3.9p1.orig/server.c 2006-05-14 07:29:21.000000000 +0200
-+++ openntpd-3.9p1/server.c 2010-07-02 15:33:05.061342638 +0200
-@@ -150,21 +150,33 @@ server_dispatch(int fd, struct ntpd_conf
- version = (query.status & VERSIONMASK) >> 3;
-
- bzero(&reply, sizeof(reply));
-- if (conf->status.synced)
-+ if (conf->status.synced || conf->ignore)
- reply.status = conf->status.leap;
- else
- reply.status = LI_ALARM;
-+
- reply.status |= (query.status & VERSIONMASK);
- if ((query.status & MODEMASK) == MODE_CLIENT)
- reply.status |= MODE_SERVER;
- else
- reply.status |= MODE_SYM_PAS;
-
-- reply.stratum = conf->status.stratum;
-+ if (conf->ignore) {
-+ reply.stratum = 1;
-+ reply.precision = -20;
-+ } else {
-+ reply.stratum = conf->status.stratum;
-+ reply.precision = conf->status.precision;
-+ }
-+
- reply.ppoll = query.ppoll;
-- reply.precision = conf->status.precision;
- reply.rectime = d_to_lfp(rectime);
-- reply.reftime = d_to_lfp(conf->status.reftime);
-+
-+ if (conf->ignore)
-+ reply.reftime = d_to_lfp(gettime());
-+ else
-+ reply.reftime = d_to_lfp(conf->status.reftime);
-+
- reply.xmttime = d_to_lfp(gettime());
- reply.orgtime = query.xmttime;
- reply.rootdelay = d_to_sfp(conf->status.rootdelay);