mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
16245a5d8e
1721453 Remove special handling of A-for-A queries. 499d8dd Fix boundary for test introduced in 3e3f1029c9ec6c63e430ff51063a6301d4b2262 6f1cbfd Fix debian/readme typo. 55ecde7 Inotify: Ignore backup files created by editors 6b54d69 Make failure to chown() pidfile a warning. 246a31c Change ownership of pid file, to keep systemd happy. 83e4b73 Remove confusion between --user and --script-user. 6340ca7 Tweak heuristic for initial DNSSEC memory allocation. baf553d Default min-port to 1024 to avoid reserved ports. 486bcd5 Simplify and correct bindtodevice(). be9a74d Close Debian bug for CVE-2017-15107. ffcbc0f Example config typo fixes. a969ba6 Special case NSEC processing for root DS record, to avoid spurious BOGUS. f178172 Add homepage to Debian control file. cd7df61 Fix DNSSEC validation errors introduced in 4fe6744a220eddd3f1749b40cac3dfc510787de6 c1a4e25 Try to be a little more clever at falling back to smaller DNS packet sizes. 4fe6744 DNSSEC fix for wildcard NSEC records. CVE-2017-15107 applies. 3bd4c47 Remove limit on length of command-line options. 98196c4 Typo fix. 22cd860 Allow more than one --bridge-interface option to refer to an interface. 3c973ad Use SIGINT (instead of overloading SIGHUP) to turn on DNSSEC time validation. faaf306 Spelling fixes. c7e6aea Change references to gPXE to iPXE. Development of EtherBoot gPXE was always development of iPXE core developer Michael Brown. e541245 Handle duplicate RRs in DNSSEC validation. 84a01be Bump year in Debian copyright notice. d1ced3a Update copyrights to 2018. a6cee69 Fix exit code from dhcp_release6. 0039920 Severely fix code formating of contrib/lease-tools/dhcp_release6.c 39d8550 Run Debian startup regex in "C" locale. ef3d137 Fix infinite retries in strict-order mode. 8c707e1 Make 373e91738929a3d416e6292e65824184ba8428a6 compile without DNSSEC. 373e917 Fix a6004d7f17687ac2455f724d0b57098c413f128d to cope with >256 RRs in answer section. 74f0f9a Commment language tweaks. ed6bdb0 Man page typos. c88af04 Modify doc.html to mention git-over-http is now available. ae0187d Fix trust-anchor regexp in Debian init script. 0c50e3d Bump version in Debian package. 075366a Open inotify socket only when used. 8e8b2d6 Release notes update. 087eb76 Always return a SERVFAIL response to DNS queries with RD=0. ebedcba Typo in printf format string added in 22dee512f3738f87539a79aeb52b9e670b3bd104 0954a97 Remove RSA/MD5 DNSSEC algorithm. b77efc1 Tidy DNSSEC algorithm table use. 3b0cb34 Fix manpage which said ZSK but meant KSK. aa6f832 Add a few DNS RRs to the table. ad9c6f0 Add support for Ed25519 DNSSEC signature algorithm. a6004d7 Fix caching logic for validated answers. c366717 Tidy up add_resource_record() buffer size checks. 22dee51 Log DNS server max packet size reduction. 6fd5d79 Fix logic on EDNS0 headers. 9d6918d Use IP[V6]_UNICAST_IF socket option instead of SO_BINDTODEVICE for DNS. a49c5c2 Fix search_servers() segfault with DNSSEC. 30858e3 Spaces in CNAME options break parsing. Refresh patches. Remove upstreamed patches: 250-Fix-infinite-retries-in-strict-order-mode.patch 260-dnssec-SIGINT.patch 270-dnssec-wildcards.patch Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
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)
|