openwrtv4/package/network/services/dnsmasq/patches/0010-Log-warning-on-very-large-cachesize-config-instead-o.patch
Kevin Darbyshire-Bryant fbf475403b dnsmasq: bump to latest patches on 2.80rc2
Refresh patches and backport upstream to current HEAD:

a997ca0 Fix sometimes missing DNSSEC RRs when DNSSEC validation not enabled.
51e4eee Fix address-dependent domains for IPv6.
05ff659 Fix stupid infinite loop introduced by preceding commit.
db0f488 Handle some corner cases in RA contructed interfaces with addresses changing interface.
7dcca6c Warn about the impact of cache-size on performance.
090856c Allow zone transfer in authoritative mode whenever auth-peer is specified.
cc5cc8f Sane error message when pcap file header is wrong.
c488b68 Handle standard and contructed dhcp-ranges on the same interface.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-07-03 13:58:55 +01:00

38 lines
1.2 KiB
Diff

From 1f1873aadd092a0fab505dd278a484d887ba0ec3 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Fri, 11 May 2018 23:38:23 +0100
Subject: [PATCH 10/17] Log warning on very large cachesize config, instead of
truncating it.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
src/dnsmasq.c | 6 +++++-
src/option.c | 2 --
2 files changed, 5 insertions(+), 3 deletions(-)
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -740,7 +740,11 @@ int main (int argc, char **argv)
else
{
if (daemon->cachesize != 0)
- my_syslog(LOG_INFO, _("started, version %s cachesize %d"), VERSION, daemon->cachesize);
+ {
+ my_syslog(LOG_INFO, _("started, version %s cachesize %d"), VERSION, daemon->cachesize);
+ if (daemon->cachesize > 10000)
+ my_syslog(LOG_WARNING, _("cache size greater than 10000 may cause performance issues, and is unlikely to be useful."));
+ }
else
my_syslog(LOG_INFO, _("started, version %s cache disabled"), VERSION);
--- a/src/option.c
+++ b/src/option.c
@@ -2603,8 +2603,6 @@ static int one_opt(int option, char *arg
if (size < 0)
size = 0;
- else if (size > 10000)
- size = 10000;
daemon->cachesize = size;
}