diff options
author | Steven Barth <steven@midlink.org> | 2015-07-30 08:53:43 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-07-30 08:53:43 +0000 |
commit | 6427530d52da395aa1e1b7598532d75f4d55e34e (patch) | |
tree | b76f6a0a3abd1f1402cfa6f18f71da57d09f3518 /package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch | |
parent | 4faafd5c88f33b16db1b1c492350585523d528ca (diff) | |
download | master-187ad058-6427530d52da395aa1e1b7598532d75f4d55e34e.tar.gz master-187ad058-6427530d52da395aa1e1b7598532d75f4d55e34e.tar.bz2 master-187ad058-6427530d52da395aa1e1b7598532d75f4d55e34e.zip |
dnsmasq: Bump to dnsmasq2.74
Bump to dnsmasq2.74 & refresh patches to fix fuzz
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46522 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch')
-rw-r--r-- | package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch | 14 |
1 files changed, 6 insertions, 8 deletions
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 index 97dfe3bdbf..81fbf185b1 100644 --- a/package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch +++ b/package/network/services/dnsmasq/patches/210-dnssec-improve-timestamp-heuristic.patch @@ -10,35 +10,33 @@ Signed-off-by: Steven Barth <steven@midlink.org> --- a/src/dnssec.c +++ b/src/dnssec.c -@@ -432,17 +432,24 @@ static int back_to_the_future; +@@ -429,17 +429,24 @@ static time_t timestamp_time; int setup_timestamp(void) { struct stat statbuf; -- + time_t now; + time_t base = 1420070400; /* 1-1-2015 */ -+ - back_to_the_future = 0; + + 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) ++ if (difftime(now, base) >= 0 && difftime(timestamp_time, now) <= 0) { /* time already OK, update timestamp, and do key checking from the start. */ if (utime(daemon->timestamp_file, NULL) == -1) -@@ -463,7 +470,7 @@ int setup_timestamp(void) +@@ -460,7 +467,7 @@ int setup_timestamp(void) close(fd); |