]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: add test for mixing CNAME with other types on wildcards 13635/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Wed, 6 Dec 2023 17:23:44 +0000 (18:23 +0100)
committermind04 <mind04@monshouwer.org>
Thu, 14 Dec 2023 00:09:34 +0000 (01:09 +0100)
modules/tinydnsbackend/data
modules/tinydnsbackend/data.cdb
regression-tests.nobackend/tinydns-data-check/expected_result
regression-tests/tests/cname-and-wildcard-trump/command [new file with mode: 0755]
regression-tests/tests/cname-and-wildcard-trump/description [new file with mode: 0644]
regression-tests/tests/cname-and-wildcard-trump/expected_result [new file with mode: 0644]
regression-tests/tests/cname-and-wildcard-trump/skip-unboundhost [new file with mode: 0644]
regression-tests/zones/example.com

index 7a262b3edac8391b341fb7c7407c1394c98eff80..dca063c8af3b30b4456958903fac9bb39ec631de 100644 (file)
@@ -8,6 +8,7 @@
 &italy.example.com::italy-ns2.example.com.:120
 &usa.example.com::usa-ns1.usa.example.com.:120
 &usa.example.com::usa-ns2.usa.example.com.:120
++\052.mixed-wc.example.com:192.168.1.1:120
 +\052.w5.example.com:1.2.3.5:120
 +bar.svcb.example.com:192.0.2.1:120
 +double.example.com:192.168.5.1:120
 @mail.example.com::smtp1.example.com.:25:120
 @together-too-much.example.com::toomuchinfo-a.example.com.:25:120
 @together-too-much.example.com::toomuchinfo-b.example.com.:25:120
+C\052.mixed-wc.example.com:outpost.example.com.:120
 C\052.w1.example.com:x.y.z.w2.example.com.:120
 C\052.w2.example.com:x.y.z.w3.example.com.:120
 C\052.w3.example.com:x.y.z.w4.example.com.:120
index b71ae2d51ecda7103f1a61fb5fa10ea28aebb0ab..ecb1694777a9a64bfd3e358e69d2ccd098119c27 100644 (file)
Binary files a/modules/tinydnsbackend/data.cdb and b/modules/tinydnsbackend/data.cdb differ
index 71c0ebda7acb097eeca62f8458096845f76364af..29e484430fb70a07131f8f07401e94b3ed5cba4d 100644 (file)
@@ -1,4 +1,4 @@
-229dad9ea0464a429685d3dda8a8e9ef  ../regression-tests/zones/example.com
+2ed2eb54a4cb3fd105aa78e6d4c99685  ../regression-tests/zones/example.com
 f8f0d7b157495ec8ee70851e3d5cb65e  ../regression-tests/zones/test.com
 e5e3ee998d151fe194b98997eaa36c53  ../regression-tests/zones/test.dyndns
 dee3e8b568549d9450134b555ca73990  ../regression-tests/zones/sub.test.dyndns
@@ -15,5 +15,5 @@ a98864b315f16bcf49ce577426063c42  ../regression-tests/zones/cdnskey-cds-test.com
 9aeed2c26d0c3ba3baf22dfa9568c451  ../regression-tests/zones/2.0.192.in-addr.arpa
 99c73e8b5db5781fec1ac3fa6a2662a9  ../regression-tests/zones/cryptokeys.org
 1f9e19be0cff67330f3a0a5347654f91  ../regression-tests/zones/hiddencryptokeys.org
-964425367cec0d828222b144c4e1c540  ../modules/tinydnsbackend/data
-f3932b1df41d683f47516455b571c358  ../modules/tinydnsbackend/data.cdb
+e85d67cb577cf1de3127e439e7529311  ../modules/tinydnsbackend/data
+7715e725358f969aa92e46ae9be0c464  ../modules/tinydnsbackend/data.cdb
diff --git a/regression-tests/tests/cname-and-wildcard-trump/command b/regression-tests/tests/cname-and-wildcard-trump/command
new file mode 100755 (executable)
index 0000000..81371ad
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cleandig test.mixed-wc.example.com A
diff --git a/regression-tests/tests/cname-and-wildcard-trump/description b/regression-tests/tests/cname-and-wildcard-trump/description
new file mode 100644 (file)
index 0000000..4388603
--- /dev/null
@@ -0,0 +1,2 @@
+If a CNAME and another type exist on a wildcard (ignoring RFC requirements),
+only the CNAME shall be returned, ignoring the other type.
diff --git a/regression-tests/tests/cname-and-wildcard-trump/expected_result b/regression-tests/tests/cname-and-wildcard-trump/expected_result
new file mode 100644 (file)
index 0000000..ef95f7d
--- /dev/null
@@ -0,0 +1,4 @@
+0      outpost.example.com.    120     IN      A       192.168.2.1
+0      test.mixed-wc.example.com.      120     IN      CNAME   outpost.example.com.
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='test.mixed-wc.example.com.', qtype=A
diff --git a/regression-tests/tests/cname-and-wildcard-trump/skip-unboundhost b/regression-tests/tests/cname-and-wildcard-trump/skip-unboundhost
new file mode 100644 (file)
index 0000000..e69de29
index f2decf231d74584a4d497056a1610858d82adfac..cd5657a8530647176f36206cd233f02e602d0ca9 100644 (file)
@@ -81,6 +81,10 @@ italy                        IN      NS      italy-ns2
 italy-ns1              IN      A       192.168.5.1
 italy-ns2              IN      A       192.168.5.2
 ;
+; CNAME on wildcard mixed with another type
+*.mixed-wc                     IN      A       192.168.1.1
+*.mixed-wc                     IN      CNAME   outpost
+;
 mail                   IN      MX      25      smtp1
 smtp1                  IN      CNAME   outpost
 ;