diff --git a/patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch b/patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch index a1df81b..1c2a073 100644 --- a/patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch +++ b/patches/0003-conditionally-fill-in-sin_len-sin6_len-if-they-exist.patch @@ -1,11 +1,12 @@ -From a645994d1cac3d1df922f43256b084617c406e23 Mon Sep 17 00:00:00 2001 +From 66c1f59300b4841caebd5e8cebd38dfe73dc197e Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 30 Dec 2014 09:02:50 -0600 Subject: [PATCH 03/13] conditionally fill in sin_len/sin6_len if they exist --- src/usr.sbin/ntpd/config.c | 8 ++++++++ - 1 file changed, 8 insertions(+) + src/usr.sbin/ntpd/parse.y | 8 +++++--- + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c index e3eeed3d6..a84635ab7 100644 @@ -48,6 +49,30 @@ index e3eeed3d6..a84635ab7 100644 memcpy(&sa_in6->sin6_addr, &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr, sizeof(struct in6_addr)); } +diff --git a/src/usr.sbin/ntpd/parse.y b/src/usr.sbin/ntpd/parse.y +index af4ad1731..8197fe953 100644 +--- a/src/usr.sbin/ntpd/parse.y ++++ b/src/usr.sbin/ntpd/parse.y +@@ -137,14 +137,16 @@ main : LISTEN ON address listen_opts { + struct sockaddr_in6 sin6; + + sin4.sin_family = AF_INET; +- sin4.sin_len = sizeof(struct sockaddr_in); + sin6.sin6_family = AF_INET6; ++#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN ++ sin4.sin_len = sizeof(struct sockaddr_in); + sin6.sin6_len = sizeof(struct sockaddr_in6); ++#endif + + if (inet_pton(AF_INET, $3, &sin4.sin_addr) == 1) +- memcpy(&query_addr4, &sin4, sin4.sin_len); ++ memcpy(&query_addr4, &sin4, sizeof(struct in_addr)); + else if (inet_pton(AF_INET6, $3, &sin6.sin6_addr) == 1) +- memcpy(&query_addr6, &sin6, sin6.sin6_len); ++ memcpy(&query_addr6, &sin6, sizeof(struct in6_addr)); + else { + yyerror("invalid IPv4 or IPv6 address: %s\n", + $3); -- 2.13.0 diff --git a/patches/0004-check-if-rdomain-support-is-available.patch b/patches/0004-check-if-rdomain-support-is-available.patch index 7ec7958..725144d 100644 --- a/patches/0004-check-if-rdomain-support-is-available.patch +++ b/patches/0004-check-if-rdomain-support-is-available.patch @@ -1,4 +1,4 @@ -From f11cb03a572a50f0fe5a44463f7f3f4d23f4110a Mon Sep 17 00:00:00 2001 +From db8b0669905e63b8708181b400b887f8d19a6ce1 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 30 Dec 2014 09:05:46 -0600 Subject: [PATCH 04/13] check if rdomain support is available. @@ -29,10 +29,10 @@ index 30ef206b4..30f0304dc 100644 #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 af4ad1731..73b221ba6 100644 +index 8197fe953..b6ef08097 100644 --- a/src/usr.sbin/ntpd/parse.y +++ b/src/usr.sbin/ntpd/parse.y -@@ -432,11 +432,13 @@ weight : WEIGHT NUMBER { +@@ -434,11 +434,13 @@ weight : WEIGHT NUMBER { opts.weight = $2; } rtable : RTABLE NUMBER { diff --git a/patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch b/patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch index 4e7fc7a..c32f051 100644 --- a/patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch +++ b/patches/0005-update-ntpd.conf-to-indicate-OS-dependent-options.patch @@ -1,4 +1,4 @@ -From ccaaa374468f6bd90fc72d4ce6b83c02d50a4c79 Mon Sep 17 00:00:00 2001 +From 999b87a59812e6c485618d2806bc2a05af1787cc Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 30 Dec 2014 09:20:03 -0600 Subject: [PATCH 05/13] update ntpd.conf to indicate OS-dependent options diff --git a/patches/0006-allow-overriding-default-user-and-file-locations.patch b/patches/0006-allow-overriding-default-user-and-file-locations.patch index 3b76270..40dc024 100644 --- a/patches/0006-allow-overriding-default-user-and-file-locations.patch +++ b/patches/0006-allow-overriding-default-user-and-file-locations.patch @@ -1,4 +1,4 @@ -From d22481a297572f5b30aa5f45477ca46c3b0e1a36 Mon Sep 17 00:00:00 2001 +From 3d967b9daff41f325171bef987218f6bd39a2703 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 1 Jan 2015 07:18:11 -0600 Subject: [PATCH 06/13] allow overriding default user and file locations diff --git a/patches/0007-add-p-option-to-create-a-pid-file.patch b/patches/0007-add-p-option-to-create-a-pid-file.patch index a4d25d4..08dd83e 100644 --- a/patches/0007-add-p-option-to-create-a-pid-file.patch +++ b/patches/0007-add-p-option-to-create-a-pid-file.patch @@ -1,4 +1,4 @@ -From 01dedce2f8b27d4c6c832e735f7b21ea4eeb280b Mon Sep 17 00:00:00 2001 +From 6e0861d02aadcdeb00995e307e805189e4eefbc8 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 31 Dec 2014 08:26:41 -0600 Subject: [PATCH 07/13] add -p option to create a pid file diff --git a/patches/0008-initialize-setproctitle-where-needed.patch b/patches/0008-initialize-setproctitle-where-needed.patch index 0e6b026..854e569 100644 --- a/patches/0008-initialize-setproctitle-where-needed.patch +++ b/patches/0008-initialize-setproctitle-where-needed.patch @@ -1,4 +1,4 @@ -From 9f8e52f7b67bd2d3153f4ed69e195de67d5a9e8d Mon Sep 17 00:00:00 2001 +From e5fe65b2c3ddccaf70b1cad493ff7efeda5ede6f Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 12 Jan 2015 06:18:31 -0600 Subject: [PATCH 08/13] initialize setproctitle where needed diff --git a/patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch b/patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch index c24e7dc..0663750 100644 --- a/patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch +++ b/patches/0009-Notify-the-user-when-constraint-support-is-disabled.patch @@ -1,4 +1,4 @@ -From 0c3ffe9434a567d243b016c39fff49306f45b181 Mon Sep 17 00:00:00 2001 +From 662cb42337bf04bb3d784a4f9571dc376228f401 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Fri, 27 Mar 2015 23:14:15 -0500 Subject: [PATCH 09/13] Notify the user when constraint support is disabled. diff --git a/patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch b/patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch index 5659aaa..290785e 100644 --- a/patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch +++ b/patches/0010-add-a-method-for-updating-the-realtime-clock-on-sync.patch @@ -1,4 +1,4 @@ -From 9f61f172cbaa15ec86f7cece2fd542c085018408 Mon Sep 17 00:00:00 2001 +From 6c6ea48c43c8438d0fadff1d994977f270f6236a Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 4 May 2015 04:27:29 -0500 Subject: [PATCH 10/13] add a method for updating the realtime clock on sync diff --git a/patches/0011-Deal-with-missing-SO_TIMESTAMP.patch b/patches/0011-Deal-with-missing-SO_TIMESTAMP.patch index 40c86ac..ca3ada3 100644 --- a/patches/0011-Deal-with-missing-SO_TIMESTAMP.patch +++ b/patches/0011-Deal-with-missing-SO_TIMESTAMP.patch @@ -1,4 +1,4 @@ -From b677780a12f57f2d1221e6df0f46e2600630b440 Mon Sep 17 00:00:00 2001 +From 881d29d2e864c858458e87706751c35fe231519e Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 6 Dec 2015 22:35:38 -0600 Subject: [PATCH 11/13] Deal with missing SO_TIMESTAMP diff --git a/patches/0012-check-result-of-ftello-ftruncate.patch b/patches/0012-check-result-of-ftello-ftruncate.patch index 0cfdef0..bf6425d 100644 --- a/patches/0012-check-result-of-ftello-ftruncate.patch +++ b/patches/0012-check-result-of-ftello-ftruncate.patch @@ -1,4 +1,4 @@ -From 590d40ef978409010cc1063cf97952158657e82b Mon Sep 17 00:00:00 2001 +From ada94a3f01ba9dbcee3b74116b76d7da6ade2d6d Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 21 Dec 2015 05:53:20 -0600 Subject: [PATCH 12/13] check result of ftello/ftruncate diff --git a/patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch b/patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch index 1f64d9a..fa90f82 100644 --- a/patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch +++ b/patches/0013-set-IPV6_V6ONLY-if-we-are-binding-to-an-IPv6-address.patch @@ -1,4 +1,4 @@ -From d98b8803ab64ce93775bdf9cda35d4379a255dd0 Mon Sep 17 00:00:00 2001 +From 9398c9c6c64add64c176519794bf57f142efeaa5 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sat, 13 Aug 2016 14:22:02 -0500 Subject: [PATCH 13/13] set IPV6_V6ONLY if we are binding to an IPv6 address