dnsmasq: Backport 2 upstream patches
[openwrt/staging/pepe2k.git] / package / network / services / dnsmasq / patches / 0002-PATCH-Fix-error-introduced-in-51471cafa5a4fa44d6fe49.patch
1 From ccff85ad72d2f858d9743d40525128e4f62d41a8 Mon Sep 17 00:00:00 2001
2 From: renmingshuai <renmingshuai@huawei.com>
3 Date: Wed, 21 Feb 2024 00:24:25 +0000
4 Subject: [PATCH] Fix error introduced in
5 51471cafa5a4fa44d6fe490885d9910bd72a5907
6
7 Signed-off-by: renmingshuai <renmingshuai@huawei.com>
8 ---
9 src/dnssec.c | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12 --- a/src/dnssec.c
13 +++ b/src/dnssec.c
14 @@ -1547,7 +1547,7 @@ static int prove_non_existence_nsec3(str
15 nsecs[i] = NULL; /* Speculative, will be restored if OK. */
16
17 if (!(p = skip_name(nsec3p, header, plen, 15)))
18 - return 0; /* bad packet */
19 + return DNSSEC_FAIL_BADPACKET; /* bad packet */
20
21 p += 10; /* type, class, TTL, rdlen */
22
23 @@ -1640,7 +1640,7 @@ static int prove_non_existence_nsec3(str
24 if (!wildname)
25 {
26 if (!(wildcard = strchr(next_closest, '.')) || wildcard == next_closest)
27 - return 0;
28 + return DNSSEC_FAIL_NONSEC;
29
30 wildcard--;
31 *wildcard = '*';