dnsmasq: Backport 2 upstream patches
[openwrt/openwrt.git] / package / network / services / dnsmasq / patches / 0001-Fix-spurious-resource-limit-exceeded-messages.patch
1 From 1ed783b8d7343c42910a61f12a8fc6237eb80417 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Mon, 19 Feb 2024 12:22:43 +0000
4 Subject: Fix spurious "resource limit exceeded" messages.
5
6 Replies from upstream with a REFUSED rcode can result in
7 log messages stating that a resource limit has been exceeded,
8 which is not the case.
9
10 Thanks to Dominik Derigs and the Pi-hole project for
11 spotting this.
12 ---
13 CHANGELOG | 5 +++++
14 src/forward.c | 6 +++---
15 2 files changed, 8 insertions(+), 3 deletions(-)
16
17 --- a/CHANGELOG
18 +++ b/CHANGELOG
19 @@ -1,3 +1,8 @@
20 +version 2.91
21 + Fix spurious "resource limit exceeded messages". Thanks to
22 + Dominik Derigs for the bug report.
23 +
24 +
25 version 2.90
26 Fix reversion in --rev-server introduced in 2.88 which
27 caused breakage if the prefix length is not exactly divisible
28 --- a/src/forward.c
29 +++ b/src/forward.c
30 @@ -937,10 +937,10 @@ static void dnssec_validate(struct frec
31 status = dnssec_validate_reply(now, header, plen, daemon->namebuff, daemon->keyname, &forward->class,
32 !option_bool(OPT_DNSSEC_IGN_NS) && (forward->sentto->flags & SERV_DO_DNSSEC),
33 NULL, NULL, NULL, &orig->validate_counter);
34 - }
35
36 - if (STAT_ISEQUAL(status, STAT_ABANDONED))
37 - log_resource = 1;
38 + if (STAT_ISEQUAL(status, STAT_ABANDONED))
39 + log_resource = 1;
40 + }
41
42 /* Can't validate, as we're missing key data. Put this
43 answer aside, whilst we get that. */