Browse Source

disable broken rdomain support for FreeBSD

master
Brent Cook 4 years ago
parent
commit
6448060a5d
15 changed files with 30 additions and 45 deletions
  1. +2
    -20
      patches/0004-check-if-rdomain-support-is-available.patch
  2. +1
    -1
      patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch
  3. +4
    -4
      patches/0006-allow-overriding-default-user-and-file-locations.patch
  4. +3
    -3
      patches/0007-add-p-option-to-create-a-pid-file.patch
  5. +1
    -1
      patches/0008-initialize-setproctitle-where-needed.patch
  6. +1
    -1
      patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch
  7. +1
    -1
      patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch
  8. +1
    -1
      patches/0011-Deal-with-missing-SO_TIMESTAMP.patch
  9. +1
    -1
      patches/0012-check-result-of-ftello-ftruncate.patch
  10. +1
    -1
      patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch
  11. +1
    -1
      patches/0014-use-adjtimex-over-adjtime-check-return-value-and-adj.patch
  12. +1
    -1
      patches/0015-increase-buffer-sizes-potential-truncation.patch
  13. +10
    -7
      patches/0016-Don-t-retry-DNS-if-Checking-Disable-flag-is-not-avai.patch
  14. +1
    -1
      patches/0017-handle-KERN_SECURELVL-when-available.patch
  15. +1
    -1
      patches/0018-initialize-deadline.patch

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

@ -1,4 +1,4 @@
From b83879413dbdc63ed6745f722ca59cf5942a149f Mon Sep 17 00:00:00 2001
From 9e3c26b3a97be2a6f381edff36cf410eda895798 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:05:46 -0600
Subject: [PATCH 04/18] check if rdomain support is available.
@ -6,28 +6,10 @@ Subject: [PATCH 04/18] check if rdomain support is available.
Handle FreeBSD's calling rdomain 'FIB'.
- from naddy@openbsd.org
---
src/usr.sbin/ntpd/ntpd.h | 6 ++++++
src/usr.sbin/ntpd/parse.y | 2 ++
src/usr.sbin/ntpd/server.c | 15 ++++++++++++++-
3 files changed, 22 insertions(+), 1 deletion(-)
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
index 208d19ccdf..05493ad1b2 100644
--- a/src/usr.sbin/ntpd/ntpd.h
+++ b/src/usr.sbin/ntpd/ntpd.h
@@ -41,6 +41,12 @@
#define DRIFTFILE "/var/db/ntpd.drift"
#define CTLSOCKET "/var/run/ntpd.sock"
+#if defined(SO_SETFIB)
+#define SO_RTABLE SO_SETFIB
+#define SIOCGIFRDOMAIN SIOCGIFFIB
+#define ifr_rdomainid ifr_fib
+#endif
+
#define INTERVAL_QUERY_NORMAL 30 /* sync to peers every n secs */
#define INTERVAL_QUERY_PATHETIC 60
#define INTERVAL_QUERY_AGGRESSIVE 5
diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y
index ab87872cfe..4a101bcd6d 100644
--- a/src/usr.sbin/ntpd/parse.y


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

@ -1,4 +1,4 @@
From 52eebc084d17e17870e69937c5c2704126e15384 Mon Sep 17 00:00:00 2001
From e0c1260cde3b84fe287f75f1c1f96c7086caffac Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Tue, 30 Dec 2014 09:20:03 -0600
Subject: [PATCH 05/18] update ntpd.conf to indicate OS-dependent options


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

@ -1,4 +1,4 @@
From 2359f4e6bc17e2924739cf4af4e21335ddd8508a Mon Sep 17 00:00:00 2001
From 0bc7191cc87150509875af90298ca763df64a762 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Thu, 1 Jan 2015 07:18:11 -0600
Subject: [PATCH 06/18] allow overriding default user and file locations
@ -10,7 +10,7 @@ default user.
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
index 05493ad1b2..98f235be94 100644
index 208d19ccdf..b360af9eac 100644
--- a/src/usr.sbin/ntpd/ntpd.h
+++ b/src/usr.sbin/ntpd/ntpd.h
@@ -36,10 +36,20 @@
@ -35,8 +35,8 @@ index 05493ad1b2..98f235be94 100644
+#define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift"
+#define CTLSOCKET LOCALSTATEDIR "/run/ntpd.sock"
#if defined(SO_SETFIB)
#define SO_RTABLE SO_SETFIB
#define INTERVAL_QUERY_NORMAL 30 /* sync to peers every n secs */
#define INTERVAL_QUERY_PATHETIC 60
--
2.27.0

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

@ -1,4 +1,4 @@
From 3275b87581b58ea6ee9d5a774afaad9314c73be0 Mon Sep 17 00:00:00 2001
From e809e7f516d3eb2dbd6c7bf250835aadff59b796 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Wed, 31 Dec 2014 08:26:41 -0600
Subject: [PATCH 07/18] add -p option to create a pid file
@ -134,10 +134,10 @@ index e015d1d093..a0da39adf7 100644
timeout = INFTIM;
break;
diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
index 98f235be94..bd5e7701a0 100644
index b360af9eac..3ea46ac064 100644
--- a/src/usr.sbin/ntpd/ntpd.h
+++ b/src/usr.sbin/ntpd/ntpd.h
@@ -267,6 +267,7 @@ struct ntpd_conf {
@@ -261,6 +261,7 @@ struct ntpd_conf {
u_int8_t *ca;
size_t ca_len;
int tmpfail;


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

@ -1,4 +1,4 @@
From 34fcb744944e651e0b26b019a3e69cbbc181a1ad Mon Sep 17 00:00:00 2001
From 549bec923b5cdbd6baa83a67b7e625f1fa824539 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 12 Jan 2015 06:18:31 -0600
Subject: [PATCH 08/18] initialize setproctitle where needed


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

@ -1,4 +1,4 @@
From 8e59facf2906e02c93eb63c69342b622836ea384 Mon Sep 17 00:00:00 2001
From 49228b4b3b4c49430f93629b75871154e01154f1 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Fri, 27 Mar 2015 23:14:15 -0500
Subject: [PATCH 09/18] Notify the user when constraint support is disabled.


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

@ -1,4 +1,4 @@
From fe9855dbbb553d5eccd40d24a7a356c017722f00 Mon Sep 17 00:00:00 2001
From b9e14b3e2031c6f633d629c314468fd4c2e3c084 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 4 May 2015 04:27:29 -0500
Subject: [PATCH 10/18] add a method for updating the realtime clock on sync


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

@ -1,4 +1,4 @@
From d32c974b39575f6c61273459f943eddbdf49169a Mon Sep 17 00:00:00 2001
From 6724771a5f732d7317862379ca1b285cfc7b0635 Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org>
Date: Sun, 6 Dec 2015 22:35:38 -0600
Subject: [PATCH 11/18] Deal with missing SO_TIMESTAMP


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

@ -1,4 +1,4 @@
From e75f69a1c7c6000b7a0b51ba4d00455013db80b6 Mon Sep 17 00:00:00 2001
From b750df031f9ab2309abe57dedbced389f765f0df Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org>
Date: Mon, 21 Dec 2015 05:53:20 -0600
Subject: [PATCH 12/18] check result of ftello/ftruncate


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

@ -1,4 +1,4 @@
From ba37da3170bc54b8bff0a341229d8dd20034f18e Mon Sep 17 00:00:00 2001
From a1b544e4c2f444bdeb29e335a498b7fb822db9c2 Mon Sep 17 00:00:00 2001
From: Brent Cook <bcook@openbsd.org>
Date: Sat, 13 Aug 2016 14:22:02 -0500
Subject: [PATCH 13/18] set IPV6_V6ONLY if we are binding to an IPv6 address


+ 1
- 1
patches/0014-use-adjtimex-over-adjtime-check-return-value-and-adj.patch View File

@ -1,4 +1,4 @@
From 9c40c5ecbbc4682a5f931a0723754a8340160860 Mon Sep 17 00:00:00 2001
From f212e683592026fdfe40e24eca9afd21da54eafb Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Sat, 19 Jan 2019 04:25:44 -0600
Subject: [PATCH 14/18] use adjtimex over adjtime, check return value and


+ 1
- 1
patches/0015-increase-buffer-sizes-potential-truncation.patch View File

@ -1,4 +1,4 @@
From 2b3abb5914e6ee355a7eb42e99acbbecf50ed252 Mon Sep 17 00:00:00 2001
From f28be53d12e9bf3fd9eda1f8791ca6e40f3aeaeb Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Sat, 13 Apr 2019 04:45:22 -0500
Subject: [PATCH 15/18] increase buffer sizes potential truncation


+ 10
- 7
patches/0016-Don-t-retry-DNS-if-Checking-Disable-flag-is-not-avai.patch View File

@ -1,31 +1,34 @@
From ea1afcebbc2e1a87dddee231b48da5a891461ff9 Mon Sep 17 00:00:00 2001
From d1f59b4cf6af36572dbd0414eab588e0222de8c5 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 8 Jun 2020 06:53:10 -0500
Subject: [PATCH 16/18] Don't retry DNS if Checking Disable flag is not
available.
---
src/usr.sbin/ntpd/config.c | 4 +++-
src/usr.sbin/ntpd/config.c | 7 +++++--
src/usr.sbin/ntpd/ntp_dns.c | 8 +++++---
2 files changed, 8 insertions(+), 4 deletions(-)
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c
index 856c3147cc..fc9df84bc4 100644
index 856c3147cc..f89742916a 100644
--- a/src/usr.sbin/ntpd/config.c
+++ b/src/usr.sbin/ntpd/config.c
@@ -138,9 +138,10 @@ int
@@ -137,17 +137,20 @@ host_dns1(const char *s, struct ntp_addr **hn, int notauth)
int
host_dns(const char *s, int synced, struct ntp_addr **hn)
{
int error, save_opts;
- int error, save_opts;
-
+ int error;
+
log_debug("trying to resolve %s", s);
error = host_dns1(s, hn, 0);
+#ifdef RES_USE_CD
if (!synced && error <= 0) {
+ int save_opts;
log_debug("no luck, trying to resolve %s without checking", s);
save_opts = _res.options;
@@ -148,6 +149,7 @@ host_dns(const char *s, int synced, struct ntp_addr **hn)
_res.options |= RES_USE_CD;
error = host_dns1(s, hn, 1);
_res.options = save_opts;
}


+ 1
- 1
patches/0017-handle-KERN_SECURELVL-when-available.patch View File

@ -1,4 +1,4 @@
From 1d973b92dd29d8d466003718f5608ce802ce9d4b Mon Sep 17 00:00:00 2001
From 063ba13b18c72994a3fdf9a3db04b56cc5a6738c Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 8 Jun 2020 06:53:53 -0500
Subject: [PATCH 17/18] handle KERN_SECURELVL when available


+ 1
- 1
patches/0018-initialize-deadline.patch View File

@ -1,4 +1,4 @@
From cf2fec695318a130477875178d2f58de169306bd Mon Sep 17 00:00:00 2001
From db23cccfcfb5dd437a59185989aef9f3bac19279 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 8 Jun 2020 06:54:12 -0500
Subject: [PATCH 18/18] initialize deadline


Loading…
Cancel
Save