[Dnsmasq-discuss] Similar to bfefd6e38c6e, fix error introduced in 51471cafa5a4

renmingshuai renmingshuai at huawei.com
Tue Feb 20 08:32:12 UTC 2024


>From 81ed4df0eb1d70fc1ac5f94b5839f8cb45602ed0 Mon Sep 17 00:00:00 2001
From: renmingshuai <renmingshuai at huawei.com>
Date: Tue, 20 Feb 2024 16:13:11 +0800
Subject: [PATCH] Fix error introduced in
51471cafa5a4fa44d6fe490885d9910bd72a5907

Signed-off-by: renmingshuai <renmingshuai at huawei.com>
---
src/dnssec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/dnssec.c b/src/dnssec.c
index ed2f53f..291b43f 100644
--- a/src/dnssec.c
+++ b/src/dnssec.c
@@ -1547,7 +1547,7 @@ static int prove_non_existence_nsec3(struct dns_header *header, size_t plen, uns
       nsecs[i] = NULL; /* Speculative, will be restored if OK. */

       if (!(p = skip_name(nsec3p, header, plen, 15)))
-       return 0; /* bad packet */
+       return DNSSEC_FAIL_BADPACKET; /* bad packet */

       p += 10; /* type, class, TTL, rdlen */

@@ -1640,7 +1640,7 @@ static int prove_non_existence_nsec3(struct dns_header *header, size_t plen, uns
   if (!wildname)
     {
       if (!(wildcard = strchr(next_closest, '.')) || wildcard == next_closest)
-       return 0;
+       return DNSSEC_FAIL_NONSEC;

       wildcard--;
       *wildcard = '*';
--
2.33.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20240220/75c0281b/attachment.htm>


More information about the Dnsmasq-discuss mailing list