dnsmasq: backport latest patches
[openwrt/openwrt.git] / package / network / services / dnsmasq / patches / 0034-Fix-bug-added-in-2.80-non-terminal-code-which-return.patch
1 From 162e5e0062ce923c494cc64282f293f0ed64fc10 Mon Sep 17 00:00:00 2001
2 From: Sven Mueller <smu@google.com>
3 Date: Wed, 27 Feb 2019 21:17:37 +0000
4 Subject: [PATCH 34/57] Fix bug added in 2.80 non-terminal code which returns
5 NODATA instead of NXDOMAIN.
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Thanks to Sven Muleller and Maciej Żenczykowski for work on this.
11
12 https://bugzilla.redhat.com/show_bug.cgi?id=1674067 refers.
13 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
14 ---
15 CHANGELOG | 5 +++++
16 src/cache.c | 1 +
17 2 files changed, 6 insertions(+)
18
19 --- a/CHANGELOG
20 +++ b/CHANGELOG
21 @@ -21,6 +21,11 @@ version 2.81
22 correct error messages. Thanks to Christian Rosentreter
23 for reporting this.
24
25 + Fix bug in DNS non-terminal code, added in 2.80, which could
26 + sometimes cause a NODATA rather than an NXDOMAIN reply.
27 + Thanks to Sven Mueller and Maciej Żenczykowski for spotting
28 + and diagnosing the bug and providing patches.
29 +
30
31 version 2.80
32 Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method
33 --- a/src/cache.c
34 +++ b/src/cache.c
35 @@ -790,6 +790,7 @@ int cache_find_non_terminal(char *name,
36 if (!is_outdated_cname_pointer(crecp) &&
37 !is_expired(now, crecp) &&
38 (crecp->flags & F_FORWARD) &&
39 + !(crecp->flags & F_NXDOMAIN) &&
40 hostname_isequal(name, cache_get_name(crecp)))
41 return 1;
42