Browse Source

rebase patches

OPENBSD_6_2
Brent Cook 7 years ago
parent
commit
16a1868f3d
13 changed files with 59 additions and 59 deletions
  1. +8
    -8
      patches/0001-Handle-IPv6-DNS-records-on-IPv4-networks-more-libera.patch
  2. +3
    -3
      patches/0002-EAI_NODATA-does-not-exist-everywhere.patch
  3. +3
    -3
      patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch
  4. +6
    -6
      patches/0004-check-if-rdomain-support-is-available.patch
  5. +4
    -4
      patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch
  6. +3
    -3
      patches/0006-allow-overriding-default-user-and-file-locations.patch
  7. +6
    -6
      patches/0007-add-p-option-to-create-a-pid-file.patch
  8. +3
    -3
      patches/0008-initialize-setproctitle-where-needed.patch
  9. +6
    -6
      patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch
  10. +3
    -3
      patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch
  11. +8
    -8
      patches/0011-Deal-with-missing-SO_TIMESTAMP.patch
  12. +3
    -3
      patches/0012-check-result-of-ftello-ftruncate.patch
  13. +3
    -3
      patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch

+ 8
- 8
patches/0001-Handle-IPv6-DNS-records-on-IPv4-networks-more-libera.patch View File

@ -1,4 +1,4 @@
From bb662d94b236661694cde356b4a8461d1d2a65fc Mon Sep 17 00:00:00 2001
From 7a3b9e1c6e340a8cfcb29cbac1ad4739a43e4929 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:10:22 -0600 Date: Tue, 30 Dec 2014 09:10:22 -0600
Subject: [PATCH 01/13] Handle IPv6 DNS records on IPv4 networks more liberally Subject: [PATCH 01/13] Handle IPv6 DNS records on IPv4 networks more liberally
@ -13,12 +13,12 @@ Original Author: Stefan Praszalowicz <stefan.praszalowicz@avedya.com>
1 file changed, 10 insertions(+), 3 deletions(-) 1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/usr.sbin/ntpd/client.c b/src/usr.sbin/ntpd/client.c diff --git a/src/usr.sbin/ntpd/client.c b/src/usr.sbin/ntpd/client.c
index ddbb1281a..3d70317d9 100644
index 3de52685b..aa9fc24c6 100644
--- a/src/usr.sbin/ntpd/client.c --- a/src/usr.sbin/ntpd/client.c
+++ b/src/usr.sbin/ntpd/client.c +++ b/src/usr.sbin/ntpd/client.c
@@ -138,9 +138,16 @@ client_query(struct ntp_peer *p)
if (p->query->fd == -1) {
struct sockaddr *sa = (struct sockaddr *)&p->addr->ss;
@@ -140,9 +140,16 @@ client_query(struct ntp_peer *p)
struct sockaddr *qa4 = (struct sockaddr *)&p->query_addr4;
struct sockaddr *qa6 = (struct sockaddr *)&p->query_addr6;
- if ((p->query->fd = socket(p->addr->ss.ss_family, SOCK_DGRAM, - if ((p->query->fd = socket(p->addr->ss.ss_family, SOCK_DGRAM,
- 0)) == -1) - 0)) == -1)
@ -34,8 +34,8 @@ index ddbb1281a..3d70317d9 100644
+ fatal("client_query socket"); + fatal("client_query socket");
+ } + }
if (connect(p->query->fd, sa, SA_LEN(sa)) == -1) {
if (errno == ECONNREFUSED || errno == ENETUNREACH ||
if (p->addr->ss.ss_family == qa4->sa_family) {
if (bind(p->query->fd, qa4, SA_LEN(qa4)) == -1)
-- --
2.11.0
2.13.0

+ 3
- 3
patches/0002-EAI_NODATA-does-not-exist-everywhere.patch View File

@ -1,4 +1,4 @@
From 0c4162f168a7eb6080146a2d9a24b79450ac6474 Mon Sep 17 00:00:00 2001
From e6b57234f53bfe3de18082dc2d374e14c189d37a Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:04:08 -0600 Date: Tue, 30 Dec 2014 09:04:08 -0600
Subject: [PATCH 02/13] EAI_NODATA does not exist everywhere Subject: [PATCH 02/13] EAI_NODATA does not exist everywhere
@ -15,7 +15,7 @@ portable software now has to have a special check instead.
1 file changed, 8 insertions(+), 2 deletions(-) 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c
index b2f688e2a..c0a99b167 100644
index fcf89ddfc..e3eeed3d6 100644
--- a/src/usr.sbin/ntpd/config.c --- a/src/usr.sbin/ntpd/config.c
+++ b/src/usr.sbin/ntpd/config.c +++ b/src/usr.sbin/ntpd/config.c
@@ -133,8 +133,14 @@ host_dns(const char *s, struct ntp_addr **hn) @@ -133,8 +133,14 @@ host_dns(const char *s, struct ntp_addr **hn)
@ -36,5 +36,5 @@ index b2f688e2a..c0a99b167 100644
log_warnx("could not parse \"%s\": %s", s, log_warnx("could not parse \"%s\": %s", s,
gai_strerror(error)); gai_strerror(error));
-- --
2.11.0
2.13.0

+ 3
- 3
patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch View File

@ -1,4 +1,4 @@
From 080b932380fed45a3da722ba9abee904513f7ea4 Mon Sep 17 00:00:00 2001
From a645994d1cac3d1df922f43256b084617c406e23 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:02:50 -0600 Date: Tue, 30 Dec 2014 09:02:50 -0600
Subject: [PATCH 03/13] conditionally fill in sin_len/sin6_len if they exist Subject: [PATCH 03/13] conditionally fill in sin_len/sin6_len if they exist
@ -8,7 +8,7 @@ Subject: [PATCH 03/13] conditionally fill in sin_len/sin6_len if they exist
1 file changed, 8 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c
index c0a99b167..87de17ae0 100644
index e3eeed3d6..a84635ab7 100644
--- a/src/usr.sbin/ntpd/config.c --- a/src/usr.sbin/ntpd/config.c
+++ b/src/usr.sbin/ntpd/config.c +++ b/src/usr.sbin/ntpd/config.c
@@ -72,7 +72,9 @@ host_v4(const char *s) @@ -72,7 +72,9 @@ host_v4(const char *s)
@ -49,5 +49,5 @@ index c0a99b167..87de17ae0 100644
res->ai_addr)->sin6_addr, sizeof(struct in6_addr)); res->ai_addr)->sin6_addr, sizeof(struct in6_addr));
} }
-- --
2.11.0
2.13.0

+ 6
- 6
patches/0004-check-if-rdomain-support-is-available.patch View File

@ -1,4 +1,4 @@
From 15cefa4812cb63b887d43ff69262a93b8e2aeb72 Mon Sep 17 00:00:00 2001
From f11cb03a572a50f0fe5a44463f7f3f4d23f4110a Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:05:46 -0600 Date: Tue, 30 Dec 2014 09:05:46 -0600
Subject: [PATCH 04/13] check if rdomain support is available. Subject: [PATCH 04/13] check if rdomain support is available.
@ -12,7 +12,7 @@ Handle FreeBSD's calling rdomain 'FIB'.
3 files changed, 22 insertions(+), 1 deletion(-) 3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
index 613b29b25..51b77b377 100644
index 30ef206b4..30f0304dc 100644
--- a/src/usr.sbin/ntpd/ntpd.h --- a/src/usr.sbin/ntpd/ntpd.h
+++ b/src/usr.sbin/ntpd/ntpd.h +++ b/src/usr.sbin/ntpd/ntpd.h
@@ -40,6 +40,12 @@ @@ -40,6 +40,12 @@
@ -29,10 +29,10 @@ index 613b29b25..51b77b377 100644
#define INTERVAL_QUERY_PATHETIC 60 #define INTERVAL_QUERY_PATHETIC 60
#define INTERVAL_QUERY_AGGRESSIVE 5 #define INTERVAL_QUERY_AGGRESSIVE 5
diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y
index 6d507957c..33fe13d6a 100644
index af4ad1731..73b221ba6 100644
--- a/src/usr.sbin/ntpd/parse.y --- a/src/usr.sbin/ntpd/parse.y
+++ b/src/usr.sbin/ntpd/parse.y +++ b/src/usr.sbin/ntpd/parse.y
@@ -404,11 +404,13 @@ weight : WEIGHT NUMBER {
@@ -432,11 +432,13 @@ weight : WEIGHT NUMBER {
opts.weight = $2; opts.weight = $2;
} }
rtable : RTABLE NUMBER { rtable : RTABLE NUMBER {
@ -47,7 +47,7 @@ index 6d507957c..33fe13d6a 100644
} }
; ;
diff --git a/src/usr.sbin/ntpd/server.c b/src/usr.sbin/ntpd/server.c diff --git a/src/usr.sbin/ntpd/server.c b/src/usr.sbin/ntpd/server.c
index b67d2745d..cbaa1158e 100644
index 123b6939a..8c18eb761 100644
--- a/src/usr.sbin/ntpd/server.c --- a/src/usr.sbin/ntpd/server.c
+++ b/src/usr.sbin/ntpd/server.c +++ b/src/usr.sbin/ntpd/server.c
@@ -35,11 +35,16 @@ setup_listeners(struct servent *se, struct ntpd_conf *lconf, u_int *cnt) @@ -35,11 +35,16 @@ setup_listeners(struct servent *se, struct ntpd_conf *lconf, u_int *cnt)
@ -112,5 +112,5 @@ index b67d2745d..cbaa1158e 100644
if (bind(la->fd, (struct sockaddr *)&la->sa, if (bind(la->fd, (struct sockaddr *)&la->sa,
SA_LEN((struct sockaddr *)&la->sa)) == -1) { SA_LEN((struct sockaddr *)&la->sa)) == -1) {
-- --
2.11.0
2.13.0

+ 4
- 4
patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch View File

@ -1,4 +1,4 @@
From b885a7eacdb56cbd2ab9804787021403becc1372 Mon Sep 17 00:00:00 2001
From ccaaa374468f6bd90fc72d4ce6b83c02d50a4c79 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:20:03 -0600 Date: Tue, 30 Dec 2014 09:20:03 -0600
Subject: [PATCH 05/13] update ntpd.conf to indicate OS-dependent options Subject: [PATCH 05/13] update ntpd.conf to indicate OS-dependent options
@ -11,7 +11,7 @@ Debian bug ID: 575705
1 file changed, 8 insertions(+), 3 deletions(-) 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/usr.sbin/ntpd/ntpd.conf.5 b/src/usr.sbin/ntpd/ntpd.conf.5 diff --git a/src/usr.sbin/ntpd/ntpd.conf.5 b/src/usr.sbin/ntpd/ntpd.conf.5
index 6e4e00121..5f437a15c 100644
index 7e9cc7678..e3c0ddd78 100644
--- a/src/usr.sbin/ntpd/ntpd.conf.5 --- a/src/usr.sbin/ntpd/ntpd.conf.5
+++ b/src/usr.sbin/ntpd/ntpd.conf.5 +++ b/src/usr.sbin/ntpd/ntpd.conf.5
@@ -38,9 +38,14 @@ The basic configuration options are as follows: @@ -38,9 +38,14 @@ The basic configuration options are as follows:
@ -39,7 +39,7 @@ index 6e4e00121..5f437a15c 100644
By default By default
.Xr ntpd 8 .Xr ntpd 8
will listen using the current routing table. will listen using the current routing table.
@@ -76,7 +81,7 @@ listen on 127.0.0.1 rtable 4
@@ -85,7 +90,7 @@ query from 2001:db8::1
.Xc .Xc
Specify a timedelta sensor device Specify a timedelta sensor device
.Xr ntpd 8 .Xr ntpd 8
@ -49,5 +49,5 @@ index 6e4e00121..5f437a15c 100644
.Xr ntpd 8 .Xr ntpd 8
will use each given sensor that actually exists. will use each given sensor that actually exists.
-- --
2.11.0
2.13.0

+ 3
- 3
patches/0006-allow-overriding-default-user-and-file-locations.patch View File

@ -1,4 +1,4 @@
From daff3f5f9458f613f8e62b4808f7c3276b1d45ed Mon Sep 17 00:00:00 2001
From d22481a297572f5b30aa5f45477ca46c3b0e1a36 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Thu, 1 Jan 2015 07:18:11 -0600 Date: Thu, 1 Jan 2015 07:18:11 -0600
Subject: [PATCH 06/13] allow overriding default user and file locations Subject: [PATCH 06/13] allow overriding default user and file locations
@ -10,7 +10,7 @@ default user.
1 file changed, 15 insertions(+), 3 deletions(-) 1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
index 51b77b377..a123d1bfc 100644
index 30f0304dc..b7ddfee0a 100644
--- a/src/usr.sbin/ntpd/ntpd.h --- a/src/usr.sbin/ntpd/ntpd.h
+++ b/src/usr.sbin/ntpd/ntpd.h +++ b/src/usr.sbin/ntpd/ntpd.h
@@ -35,10 +35,20 @@ @@ -35,10 +35,20 @@
@ -48,5 +48,5 @@ index 51b77b377..a123d1bfc 100644
#define PARENT_SOCK_FILENO CONSTRAINT_PASSFD #define PARENT_SOCK_FILENO CONSTRAINT_PASSFD
-- --
2.11.0
2.13.0

+ 6
- 6
patches/0007-add-p-option-to-create-a-pid-file.patch View File

@ -1,4 +1,4 @@
From 4ee694f478d89cf572546f761c9ef454ec10402a Mon Sep 17 00:00:00 2001
From 01dedce2f8b27d4c6c832e735f7b21ea4eeb280b Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Wed, 31 Dec 2014 08:26:41 -0600 Date: Wed, 31 Dec 2014 08:26:41 -0600
Subject: [PATCH 07/13] add -p option to create a pid file Subject: [PATCH 07/13] add -p option to create a pid file
@ -13,7 +13,7 @@ Origin: https://bugs.gentoo.org/show_bug.cgi?id=493082
3 files changed, 33 insertions(+), 5 deletions(-) 3 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/src/usr.sbin/ntpd/ntpd.8 b/src/usr.sbin/ntpd/ntpd.8 diff --git a/src/usr.sbin/ntpd/ntpd.8 b/src/usr.sbin/ntpd/ntpd.8
index dcfb6d243..1b885a13d 100644
index 689d269c6..fbcfa85b3 100644
--- a/src/usr.sbin/ntpd/ntpd.8 --- a/src/usr.sbin/ntpd/ntpd.8
+++ b/src/usr.sbin/ntpd/ntpd.8 +++ b/src/usr.sbin/ntpd/ntpd.8
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
@ -35,7 +35,7 @@ index dcfb6d243..1b885a13d 100644
Do not set the time immediately at startup. Do not set the time immediately at startup.
This is the default. This is the default.
diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c
index 1750b8cf5..8e47e2403 100644
index 0ec3ede03..3d9e089b3 100644
--- a/src/usr.sbin/ntpd/ntpd.c --- a/src/usr.sbin/ntpd/ntpd.c
+++ b/src/usr.sbin/ntpd/ntpd.c +++ b/src/usr.sbin/ntpd/ntpd.c
@@ -87,6 +87,18 @@ sighdlr(int sig) @@ -87,6 +87,18 @@ sighdlr(int sig)
@ -134,10 +134,10 @@ index 1750b8cf5..8e47e2403 100644
timeout = INFTIM; timeout = INFTIM;
break; break;
diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
index a123d1bfc..6e693661c 100644
index b7ddfee0a..39b8e7bf4 100644
--- a/src/usr.sbin/ntpd/ntpd.h --- a/src/usr.sbin/ntpd/ntpd.h
+++ b/src/usr.sbin/ntpd/ntpd.h +++ b/src/usr.sbin/ntpd/ntpd.h
@@ -249,6 +249,7 @@ struct ntpd_conf {
@@ -253,6 +253,7 @@ struct ntpd_conf {
u_int constraint_errors; u_int constraint_errors;
u_int8_t *ca; u_int8_t *ca;
size_t ca_len; size_t ca_len;
@ -146,5 +146,5 @@ index a123d1bfc..6e693661c 100644
struct ctl_show_status { struct ctl_show_status {
-- --
2.11.0
2.13.0

+ 3
- 3
patches/0008-initialize-setproctitle-where-needed.patch View File

@ -1,4 +1,4 @@
From fdee13a0fe8525bd6d3d84082e26ff7f3a2cf70f Mon Sep 17 00:00:00 2001
From 9f8e52f7b67bd2d3153f4ed69e195de67d5a9e8d Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Mon, 12 Jan 2015 06:18:31 -0600 Date: Mon, 12 Jan 2015 06:18:31 -0600
Subject: [PATCH 08/13] initialize setproctitle where needed Subject: [PATCH 08/13] initialize setproctitle where needed
@ -10,7 +10,7 @@ clobbering them.
1 file changed, 20 insertions(+) 1 file changed, 20 insertions(+)
diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c
index 8e47e2403..400528493 100644
index 3d9e089b3..57f1f4ff3 100644
--- a/src/usr.sbin/ntpd/ntpd.c --- a/src/usr.sbin/ntpd/ntpd.c
+++ b/src/usr.sbin/ntpd/ntpd.c +++ b/src/usr.sbin/ntpd/ntpd.c
@@ -117,6 +117,13 @@ usage(void) @@ -117,6 +117,13 @@ usage(void)
@ -55,5 +55,5 @@ index 8e47e2403..400528493 100644
switch (ch) { switch (ch) {
case 'd': case 'd':
-- --
2.11.0
2.13.0

+ 6
- 6
patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch View File

@ -1,4 +1,4 @@
From 0143ceba7461d06f9258ad96dfd8a972c19cbe3a Mon Sep 17 00:00:00 2001
From 0c3ffe9434a567d243b016c39fff49306f45b181 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Fri, 27 Mar 2015 23:14:15 -0500 Date: Fri, 27 Mar 2015 23:14:15 -0500
Subject: [PATCH 09/13] Notify the user when constraint support is disabled. Subject: [PATCH 09/13] Notify the user when constraint support is disabled.
@ -13,7 +13,7 @@ From Paul B. Henson.
3 files changed, 10 insertions(+), 2 deletions(-) 3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c
index 87de17ae0..5a750309c 100644
index a84635ab7..d46fca62f 100644
--- a/src/usr.sbin/ntpd/config.c --- a/src/usr.sbin/ntpd/config.c
+++ b/src/usr.sbin/ntpd/config.c +++ b/src/usr.sbin/ntpd/config.c
@@ -219,6 +219,9 @@ new_constraint(void) @@ -219,6 +219,9 @@ new_constraint(void)
@ -27,7 +27,7 @@ index 87de17ae0..5a750309c 100644
} }
diff --git a/src/usr.sbin/ntpd/constraint.c b/src/usr.sbin/ntpd/constraint.c diff --git a/src/usr.sbin/ntpd/constraint.c b/src/usr.sbin/ntpd/constraint.c
index 892bfe89e..a488eab34 100644
index 7e259af2d..8a3ddacc1 100644
--- a/src/usr.sbin/ntpd/constraint.c --- a/src/usr.sbin/ntpd/constraint.c
+++ b/src/usr.sbin/ntpd/constraint.c +++ b/src/usr.sbin/ntpd/constraint.c
@@ -336,12 +336,14 @@ priv_constraint_child(const char *pw_dir, uid_t pw_uid, gid_t pw_gid) @@ -336,12 +336,14 @@ priv_constraint_child(const char *pw_dir, uid_t pw_uid, gid_t pw_gid)
@ -46,10 +46,10 @@ index 892bfe89e..a488eab34 100644
if (chroot(pw_dir) == -1) if (chroot(pw_dir) == -1)
fatal("chroot"); fatal("chroot");
diff --git a/src/usr.sbin/ntpd/ntpd.conf.5 b/src/usr.sbin/ntpd/ntpd.conf.5 diff --git a/src/usr.sbin/ntpd/ntpd.conf.5 b/src/usr.sbin/ntpd/ntpd.conf.5
index 5f437a15c..2691f517c 100644
index e3c0ddd78..804ebaa12 100644
--- a/src/usr.sbin/ntpd/ntpd.conf.5 --- a/src/usr.sbin/ntpd/ntpd.conf.5
+++ b/src/usr.sbin/ntpd/ntpd.conf.5 +++ b/src/usr.sbin/ntpd/ntpd.conf.5
@@ -186,8 +186,11 @@ authenticated constraint,
@@ -195,8 +195,11 @@ authenticated constraint,
thereby reducing the impact of unauthenticated NTP thereby reducing the impact of unauthenticated NTP
man-in-the-middle attacks. man-in-the-middle attacks.
Received NTP packets with time information falling outside of a range Received NTP packets with time information falling outside of a range
@ -64,5 +64,5 @@ index 5f437a15c..2691f517c 100644
.It Ic constraint from Ar url .It Ic constraint from Ar url
Specify the URL, IP address or the hostname of an HTTPS server to Specify the URL, IP address or the hostname of an HTTPS server to
-- --
2.11.0
2.13.0

+ 3
- 3
patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch View File

@ -1,4 +1,4 @@
From 0cf1333742437cfc53a1bba2d3d24756a196d897 Mon Sep 17 00:00:00 2001
From 9f61f172cbaa15ec86f7cece2fd542c085018408 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com> From: Brent Cook <busterb@gmail.com>
Date: Mon, 4 May 2015 04:27:29 -0500 Date: Mon, 4 May 2015 04:27:29 -0500
Subject: [PATCH 10/13] add a method for updating the realtime clock on sync Subject: [PATCH 10/13] add a method for updating the realtime clock on sync
@ -9,7 +9,7 @@ from Christian Weisgerber
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c
index 400528493..287f9d549 100644
index 57f1f4ff3..0eb7f573c 100644
--- a/src/usr.sbin/ntpd/ntpd.c --- a/src/usr.sbin/ntpd/ntpd.c
+++ b/src/usr.sbin/ntpd/ntpd.c +++ b/src/usr.sbin/ntpd/ntpd.c
@@ -55,6 +55,7 @@ const char *ctl_lookup_option(char *, const char **); @@ -55,6 +55,7 @@ const char *ctl_lookup_option(char *, const char **);
@ -29,5 +29,5 @@ index 400528493..287f9d549 100644
} }
-- --
2.11.0
2.13.0

+ 8
- 8
patches/0011-Deal-with-missing-SO_TIMESTAMP.patch View File

@ -1,4 +1,4 @@
From a9c2be7c74c101e4ca0d6ce77fdde7dd20936b3d Mon Sep 17 00:00:00 2001
From b677780a12f57f2d1221e6df0f46e2600630b440 Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org> From: Brent Cook <bcook@openbsd.org>
Date: Sun, 6 Dec 2015 22:35:38 -0600 Date: Sun, 6 Dec 2015 22:35:38 -0600
Subject: [PATCH 11/13] Deal with missing SO_TIMESTAMP Subject: [PATCH 11/13] Deal with missing SO_TIMESTAMP
@ -11,10 +11,10 @@ Fall back to the previous client.c implementation when it is not found.
1 file changed, 9 insertions(+), 1 deletion(-) 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/usr.sbin/ntpd/client.c b/src/usr.sbin/ntpd/client.c diff --git a/src/usr.sbin/ntpd/client.c b/src/usr.sbin/ntpd/client.c
index 3d70317d9..5619454fb 100644
index aa9fc24c6..bb5c4f4c0 100644
--- a/src/usr.sbin/ntpd/client.c --- a/src/usr.sbin/ntpd/client.c
+++ b/src/usr.sbin/ntpd/client.c +++ b/src/usr.sbin/ntpd/client.c
@@ -163,10 +163,12 @@ client_query(struct ntp_peer *p)
@@ -175,10 +175,12 @@ client_query(struct ntp_peer *p)
if (p->addr->ss.ss_family == AF_INET && setsockopt(p->query->fd, if (p->addr->ss.ss_family == AF_INET && setsockopt(p->query->fd,
IPPROTO_IP, IP_TOS, &val, sizeof(val)) == -1) IPPROTO_IP, IP_TOS, &val, sizeof(val)) == -1)
log_warn("setsockopt IPTOS_LOWDELAY"); log_warn("setsockopt IPTOS_LOWDELAY");
@ -27,7 +27,7 @@ index 3d70317d9..5619454fb 100644
} }
/* /*
@@ -213,7 +215,9 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
@@ -225,7 +227,9 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
struct cmsghdr hdr; struct cmsghdr hdr;
char buf[CMSG_SPACE(sizeof(tv))]; char buf[CMSG_SPACE(sizeof(tv))];
} cmsgbuf; } cmsgbuf;
@ -37,7 +37,7 @@ index 3d70317d9..5619454fb 100644
ssize_t size; ssize_t size;
double T1, T2, T3, T4; double T1, T2, T3, T4;
time_t interval; time_t interval;
@@ -226,7 +230,6 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
@@ -238,7 +242,6 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
somsg.msg_control = cmsgbuf.buf; somsg.msg_control = cmsgbuf.buf;
somsg.msg_controllen = sizeof(cmsgbuf.buf); somsg.msg_controllen = sizeof(cmsgbuf.buf);
@ -45,7 +45,7 @@ index 3d70317d9..5619454fb 100644
if ((size = recvmsg(p->query->fd, &somsg, 0)) == -1) { if ((size = recvmsg(p->query->fd, &somsg, 0)) == -1) {
if (errno == EHOSTUNREACH || errno == EHOSTDOWN || if (errno == EHOSTUNREACH || errno == EHOSTDOWN ||
errno == ENETUNREACH || errno == ENETDOWN || errno == ENETUNREACH || errno == ENETDOWN ||
@@ -251,6 +254,8 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
@@ -263,6 +266,8 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
return (0); return (0);
} }
@ -54,7 +54,7 @@ index 3d70317d9..5619454fb 100644
for (cmsg = CMSG_FIRSTHDR(&somsg); cmsg != NULL; for (cmsg = CMSG_FIRSTHDR(&somsg); cmsg != NULL;
cmsg = CMSG_NXTHDR(&somsg, cmsg)) { cmsg = CMSG_NXTHDR(&somsg, cmsg)) {
if (cmsg->cmsg_level == SOL_SOCKET && if (cmsg->cmsg_level == SOL_SOCKET &&
@@ -260,6 +265,9 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
@@ -272,6 +277,9 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
break; break;
} }
} }
@ -65,5 +65,5 @@ index 3d70317d9..5619454fb 100644
if (T4 < JAN_1970) { if (T4 < JAN_1970) {
client_log_error(p, "recvmsg control format", EBADF); client_log_error(p, "recvmsg control format", EBADF);
-- --
2.11.0
2.13.0

+ 3
- 3
patches/0012-check-result-of-ftello-ftruncate.patch View File

@ -1,4 +1,4 @@
From 0b24427a97098670db562cf59cfea2c64e2239f1 Mon Sep 17 00:00:00 2001
From 590d40ef978409010cc1063cf97952158657e82b Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org> From: Brent Cook <bcook@openbsd.org>
Date: Mon, 21 Dec 2015 05:53:20 -0600 Date: Mon, 21 Dec 2015 05:53:20 -0600
Subject: [PATCH 12/13] check result of ftello/ftruncate Subject: [PATCH 12/13] check result of ftello/ftruncate
@ -8,7 +8,7 @@ Subject: [PATCH 12/13] check result of ftello/ftruncate
1 file changed, 5 insertions(+), 2 deletions(-) 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c
index 287f9d549..fae82ef16 100644
index 0eb7f573c..de0d750c5 100644
--- a/src/usr.sbin/ntpd/ntpd.c --- a/src/usr.sbin/ntpd/ntpd.c
+++ b/src/usr.sbin/ntpd/ntpd.c +++ b/src/usr.sbin/ntpd/ntpd.c
@@ -586,6 +586,7 @@ writefreq(double d) @@ -586,6 +586,7 @@ writefreq(double d)
@ -33,5 +33,5 @@ index 287f9d549..fae82ef16 100644
} }
-- --
2.11.0
2.13.0

+ 3
- 3
patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch View File

@ -1,4 +1,4 @@
From 66fa0621f96cad764f97e77701fb00fa825977b2 Mon Sep 17 00:00:00 2001
From d98b8803ab64ce93775bdf9cda35d4379a255dd0 Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org> From: Brent Cook <bcook@openbsd.org>
Date: Sat, 13 Aug 2016 14:22:02 -0500 Date: Sat, 13 Aug 2016 14:22:02 -0500
Subject: [PATCH 13/13] set IPV6_V6ONLY if we are binding to an IPv6 address Subject: [PATCH 13/13] set IPV6_V6ONLY if we are binding to an IPv6 address
@ -8,7 +8,7 @@ Subject: [PATCH 13/13] set IPV6_V6ONLY if we are binding to an IPv6 address
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
diff --git a/src/usr.sbin/ntpd/server.c b/src/usr.sbin/ntpd/server.c diff --git a/src/usr.sbin/ntpd/server.c b/src/usr.sbin/ntpd/server.c
index cbaa1158e..dd554e630 100644
index 8c18eb761..9eab1a74b 100644
--- a/src/usr.sbin/ntpd/server.c --- a/src/usr.sbin/ntpd/server.c
+++ b/src/usr.sbin/ntpd/server.c +++ b/src/usr.sbin/ntpd/server.c
@@ -42,6 +42,9 @@ setup_listeners(struct servent *se, struct ntpd_conf *lconf, u_int *cnt) @@ -42,6 +42,9 @@ setup_listeners(struct servent *se, struct ntpd_conf *lconf, u_int *cnt)
@ -35,5 +35,5 @@ index cbaa1158e..dd554e630 100644
if (la->rtable != -1 && if (la->rtable != -1 &&
setsockopt(la->fd, SOL_SOCKET, SO_RTABLE, &la->rtable, setsockopt(la->fd, SOL_SOCKET, SO_RTABLE, &la->rtable,
-- --
2.11.0
2.13.0

Loading…
Cancel
Save