dnsmasq: drop dnssec timestamp file patch
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Sun, 9 Dec 2018 19:34:05 +0000 (19:34 +0000)
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Mon, 10 Dec 2018 09:14:06 +0000 (09:14 +0000)
Openwrt no longer uses and has not used since 5acfe55d71 Jun 2016 the
timestamp file (/etc/dnsmasq.time) method of resolving the dnssec/ntp
dnslookup chicken/egg problem, having used signals from ntp since that
change.

Drop the 'dnssec-improve-timestamp-heuristic' patch since it is neither
used nor sent upstream.  One less thing to refresh & maintain.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch [deleted file]

index 59f5fb61582a7d32f5fdef5ac9b750f29cec376e..10537d711f385c05e1d589664340b25b3fb04b0a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.80
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
diff --git a/package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch b/package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch
deleted file mode 100644 (file)
index be1195a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 79e60e145f8a595bca5a784c00b437216d51de68 Mon Sep 17 00:00:00 2001
-From: Steven Barth <steven@midlink.org>
-Date: Mon, 13 Apr 2015 09:45:20 +0200
-Subject: [PATCH] dnssec: improve timestamp heuristic
-
-Signed-off-by: Steven Barth <steven@midlink.org>
----
- src/dnssec.c | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
-
---- a/src/dnssec.c
-+++ b/src/dnssec.c
-@@ -143,17 +143,24 @@ static time_t timestamp_time;
- int setup_timestamp(void)
- {
-   struct stat statbuf;
-+  time_t now;
-+  time_t base = 1420070400; /* 1-1-2015 */
-   
-   daemon->back_to_the_future = 0;
-   
-   if (!daemon->timestamp_file)
-     return 0;
-+
-+  now = time(NULL);
-+
-+  if (!stat("/proc/self/exe", &statbuf) && difftime(statbuf.st_mtime, base) > 0)
-+    base = statbuf.st_mtime;
-   
-   if (stat(daemon->timestamp_file, &statbuf) != -1)
-     {
-       timestamp_time = statbuf.st_mtime;
-     check_and_exit:
--      if (difftime(timestamp_time, time(0)) <=  0)
-+      if (difftime(now, base) >= 0 && difftime(timestamp_time, now) <= 0)
-       {
-         /* time already OK, update timestamp, and do key checking from the start. */
-         if (utimes(daemon->timestamp_file, NULL) == -1)
-@@ -174,7 +181,7 @@ int setup_timestamp(void)
-         close(fd);
-         
--        timestamp_time = 1420070400; /* 1-1-2015 */
-+        timestamp_time = base; /* 1-1-2015 */
-         tv[0].tv_sec = tv[1].tv_sec = timestamp_time;
-         tv[0].tv_usec = tv[1].tv_usec = 0;
-         if (utimes(daemon->timestamp_file, tv) == 0)