]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Test that false positive "success resolving" is not logged
authorMark Andrews <marka@isc.org>
Tue, 25 Jun 2024 04:00:51 +0000 (14:00 +1000)
committerMark Andrews <marka@isc.org>
Thu, 1 Aug 2024 05:58:16 +0000 (15:58 +1000)
(cherry picked from commit 111e28521497b105c3835ee57f92c7971f93a9eb)

bin/tests/system/qmin/clean.sh
bin/tests/system/qmin/ns1/root.db
bin/tests/system/qmin/ns5/in-addr.arpa.db [new file with mode: 0644]
bin/tests/system/qmin/ns5/named.conf.in
bin/tests/system/qmin/ns7/named.conf.in
bin/tests/system/qmin/tests.sh

index 52c38e68baee734c32ec8f88772bd392e663bb1f..c6ecf76276acf1753bdea44cd219c16acddf8b8c 100644 (file)
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-rm -f ns*/named.conf
 rm -f */named.memstats
 rm -f */named.run */named.run.prev
+rm -f ans*/query.log*
 rm -f dig.out.*
+rm -f named.run.*
+rm -f ns*/named.conf
 rm -f ns*/named.lock
-rm -f ans*/query.log*
 rm -f query*.log
index 325f607ee67afe92520ac7d888200f899997fadb..3854fc83c36f3d7381c7b26bede1adbb7b823eb5 100644 (file)
@@ -39,3 +39,6 @@ ns2.fwd.              A       10.53.0.2
 $TTL 2
 stale.                 NS      ns2.stale.
 ns2.stale.             A       10.53.0.2
+
+in-addr.arpa.          NS      ns5.in-addr.arpa.
+ns5.in-addr.arpa.      A       10.53.0.5
diff --git a/bin/tests/system/qmin/ns5/in-addr.arpa.db b/bin/tests/system/qmin/ns5/in-addr.arpa.db
new file mode 100644 (file)
index 0000000..1866d06
--- /dev/null
@@ -0,0 +1,21 @@
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; SPDX-License-Identifier: MPL-2.0
+;
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0.  If a copy of the MPL was not distributed with this
+; file, you can obtain one at https://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+$TTL 20
+@                      IN SOA  wpk.isc.org. a.root.servers.nil. (
+                               2000042100      ; serial
+                               600             ; refresh
+                               600             ; retry
+                               1200            ; expire
+                               2               ; minimum
+                               )
+@                      NS      ns5
+ns5                    A       10.53.0.5
index fac3538387ed6ead66b473a8b78024bcdd48e60d..fb3101279ace7d1ce7cb8434a1c0742c5cfa30bb 100644 (file)
@@ -26,6 +26,7 @@ options {
        querylog yes;
        resolver-query-timeout 30000; # 30 seconds
        dnssec-validation no;
+       disable-empty-zone 10.in-addr.arpa;
 };
 
 key rndc_key {
@@ -41,3 +42,8 @@ zone "." {
        type hint;
        file "../../_common/root.hint";
 };
+
+zone "in-addr.arpa" {
+       type primary;
+       file "in-addr.arpa.db";
+};
index 917e3e768c4ffd656a9e28f02c654da0e2969913..b6bf4c6c6d71b565d62dcddcc50a2fe4302f2eca 100644 (file)
@@ -26,6 +26,7 @@ options {
        querylog yes;
        resolver-query-timeout 30000; # 30 seconds
        dnssec-validation no;
+       disable-empty-zone 10.in-addr.arpa;
 };
 
 key rndc_key {
index d544e88d5a0825f78c671344a3fbe4b533c42f26..f8ded241ede1256615d2fe857e4569dbfcc090d0 100755 (executable)
@@ -533,5 +533,16 @@ for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
+n=$((n + 1))
+echo_i "test that \"success resolving\" is not logged for NXDOMAIN final answer when qname-minimization is in relaxed mode ($n)"
+ret=0
+nextpart ns7/named.run >/dev/null
+$DIG $DIGOPTS 1.0.53.10.in-addr.arpa ptr @10.53.0.7 >dig.out.test$n || ret=1
+nextpart ns7/named.run >named.run.test$n
+grep "status: NXDOMAIN" dig.out.test$n >/dev/null || ret=1
+grep "success resolving" named.run.test$n >/dev/null && ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1