]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add some regression tests for SVCB
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 23 Sep 2020 14:56:49 +0000 (16:56 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 25 Sep 2020 10:26:12 +0000 (12:26 +0200)
13 files changed:
modules/tinydnsbackend/data
modules/tinydnsbackend/data.cdb
regression-tests.nobackend/tinydns-data-check/expected_result
regression-tests/tests/ent-asterisk/expected_result.dnssec
regression-tests/tests/svcb-aliasmode/command [new file with mode: 0755]
regression-tests/tests/svcb-aliasmode/description [new file with mode: 0644]
regression-tests/tests/svcb-aliasmode/expected_result [new file with mode: 0644]
regression-tests/tests/svcb-aliasmode/expected_result.dnssec [new file with mode: 0644]
regression-tests/tests/svcb-servicemode/command [new file with mode: 0755]
regression-tests/tests/svcb-servicemode/description [new file with mode: 0644]
regression-tests/tests/svcb-servicemode/expected_result [new file with mode: 0644]
regression-tests/tests/svcb-servicemode/expected_result.dnssec [new file with mode: 0644]
regression-tests/zones/example.com

index aa5b363b5f7aab0dd031346428d4cb37427f70e3..2944749db1bcc56032791bbd66764bd05c392004 100644 (file)
@@ -9,7 +9,10 @@
 &usa.example.com::usa-ns1.usa.example.com.:120
 &usa.example.com::usa-ns2.usa.example.com.: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
++foo.svcb.example.com:192.0.2.1:120
++foo1.svcb.example.com:192.0.2.2:120
 +hightype.example.com:192.168.1.5:120
 +host-0.example.com:192.168.1.0:120
 +host-1.example.com:192.168.1.1:120
 +usa-ns1.usa.example.com:192.168.4.1:120
 +usa-ns2.usa.example.com:192.168.4.2:120
 :_imap._tcp.example.com:33:\000\000\000\001\000\217\004blah\004test\003com\000:120
+:bar.svcb.example.com:28:\040\001\015\270\000\000\000\000\000\000\000\000\000\003\000\001:120
+:bar.svcb.example.com:28:\040\001\015\270\000\000\000\000\000\000\000\000\000\003\000\004:120
+:bar.svcb.example.com:64:\000\001\000\000\001\000\003\002h2:120
+:bar.svcb.example.com:64:\000\003\000\000\001\000\003\002h3\000\003\000\002\005\334:120
 :dsdelegation.example.com:43:m\341\010\001\312\361\352\256\315\253\347afpx\217\220\042EK\365\375\237\332:120
 :escapedtext.example.com:16:\005begin\022the\040\042middle\042\040p\134art\007the\040end:120
+:foo.svcb.example.com:64:\000\000\004foo1\004svcb\007example\003com\000:120
+:foo1.svcb.example.com:64:\000\001\000\000\001\000\006\002h2\002h3:120
 :google-alias.example.com:65401:\023google-public-dns-a\006google\003com\000:120
 :hightype.example.com:65534:\007\355\046\000\001:120
 :host-0.example.com:108:\000PV\233\000\347:120
@@ -20304,3 +20313,25 @@ Zcdnskey-cds-test.com:ns1.cdnskey-cds-test.:ahu.example.com.:2005092501:28800:72
 &2.0.192.in-addr.arpa::ns1.example.com.:120
 &2.0.192.in-addr.arpa::ns2.example.com.:120
 Z2.0.192.in-addr.arpa:ns1.example.com.:ahu.example.com.:2000081501:28800:7200:604800:86400:120
+#2009071301 auto axfr-get
+&cryptokeys.org::cryptokeys.ds9a.nl.:3600
+&delegated.cryptokeys.org::ns1.delegated.cryptokeys.org.:3600
+&delegated.cryptokeys.org::ns2.delegated.cryptokeys.org.:3600
++cryptokeys.org:212.123.148.70:3600
++localhost.cryptokeys.org:127.0.0.1:3600
++ns1.delegated.cryptokeys.org:1.2.3.4:3600
++ns2.delegated.cryptokeys.org:4.3.2.1:3600
++smtp.cryptokeys.org:4.3.2.1:3600
++webserver.cryptokeys.org:1.2.3.4:3600
+:after.cryptokeys.org:16:\005after:3600
+:ipv6.cryptokeys.org:28:\040\001\010\210\0206\000\000\002\010\241\377\376\031\360\000:3600
+:localhost.cryptokeys.org:28:\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001:3600
+:zbefore.a.cryptokeys.org:16:\006before:3600
+:zzz.cryptokeys.org:16:\021this\040is\040the\040end..:3600
+@cryptokeys.org::cryptokeys.easy-server.com.:10:3600
+Cwww.cryptokeys.org:cryptokeys.org.:3600
+Zcryptokeys.org:cryptokeys.ds9a.nl.:ahu.ds9a.nl.:2009071301:14400:3600:604800:3600:3600
+#2009071301 auto axfr-get
+&hiddencryptokeys.org::cryptokeys.ds9a.nl.:3600
++hiddencryptokeys.org:212.123.148.70:3600
+Zhiddencryptokeys.org:cryptokeys.ds9a.nl.:ahu.ds9a.nl.:2009071301:14400:3600:604800:3600:3600
index b52b7674718e2f30e50b8bdb73958efe129585e3..022974b84f416bda36d2a55e64c11dce133286f1 100644 (file)
Binary files a/modules/tinydnsbackend/data.cdb and b/modules/tinydnsbackend/data.cdb differ
index 70ebd4a567081556bd1bf62c7fe8236f5563d858..2fb50a0f9cd13860e6d48c6474701dd300151c2b 100644 (file)
@@ -1,4 +1,4 @@
-9964df6538f0d181c151548e44d045c3  ../regression-tests/zones/example.com
+034a2b6c643ef42a58d19aaed62c6b27  ../regression-tests/zones/example.com
 fe49d2784b1bcc3b91ddd5619f0b6cc1  ../regression-tests/zones/test.com
 f0df67fa656d33fd85098cbe43893395  ../regression-tests/zones/test.dyndns
 dee3e8b568549d9450134b555ca73990  ../regression-tests/zones/sub.test.dyndns
@@ -15,4 +15,4 @@ 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
-52a95993ada0b4ed986a2fe6463a27e0  ../modules/tinydnsbackend/data.cdb
+8d42198e3c989c38edb715407bc9c4ae  ../modules/tinydnsbackend/data.cdb
index e3412a799ea5010938a4e0cfca05f15a3fc60d12..fcbcc4b84687a9be26e2b96e1c442b29f55499ad 100644 (file)
@@ -1,6 +1,6 @@
 1      example.com.    IN      RRSIG   86400   SOA 13 2 100000 [expiry] [inception] [keytag] example.com. ...
 1      example.com.    IN      SOA     86400   ns1.example.com. ahu.example.com. 2847484148 28800 7200 604800 86400
-1      host.*.sub.example.com. IN      NSEC    86400   text.example.com. A RRSIG NSEC
+1      host.*.sub.example.com. IN      NSEC    86400   bar.svcb.example.com. A RRSIG NSEC
 1      host.*.sub.example.com. IN      RRSIG   86400   NSEC 13 5 86400 [expiry] [inception] [keytag] example.com. ...
 1      start4.example.com.     IN      NSEC    86400   host.*.sub.example.com. A RRSIG NSEC
 1      start4.example.com.     IN      RRSIG   86400   NSEC 13 3 86400 [expiry] [inception] [keytag] example.com. ...
diff --git a/regression-tests/tests/svcb-aliasmode/command b/regression-tests/tests/svcb-aliasmode/command
new file mode 100755 (executable)
index 0000000..a1fd95a
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cleandig foo.svcb.example.com SVCB dnssec
\ No newline at end of file
diff --git a/regression-tests/tests/svcb-aliasmode/description b/regression-tests/tests/svcb-aliasmode/description
new file mode 100644 (file)
index 0000000..bdeb1a3
--- /dev/null
@@ -0,0 +1 @@
+Ensure SVCB Aliasmodes are followed
\ No newline at end of file
diff --git a/regression-tests/tests/svcb-aliasmode/expected_result b/regression-tests/tests/svcb-aliasmode/expected_result
new file mode 100644 (file)
index 0000000..dc76059
--- /dev/null
@@ -0,0 +1,6 @@
+0      foo.svcb.example.com.   IN      SVCB    120     0 foo1.svcb.example.com.
+2      .       IN      OPT     32768   
+2      foo1.svcb.example.com.  IN      A       120     192.0.2.2
+2      foo1.svcb.example.com.  IN      SVCB    120     1 . alpn=h2,h3
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='foo.svcb.example.com.', qtype=SVCB
diff --git a/regression-tests/tests/svcb-aliasmode/expected_result.dnssec b/regression-tests/tests/svcb-aliasmode/expected_result.dnssec
new file mode 100644 (file)
index 0000000..83d814f
--- /dev/null
@@ -0,0 +1,9 @@
+0      foo.svcb.example.com.   IN      RRSIG   120     SVCB 13 4 120 [expiry] [inception] [keytag] example.com. ...
+0      foo.svcb.example.com.   IN      SVCB    120     0 foo1.svcb.example.com.
+2      .       IN      OPT     32768   
+2      foo1.svcb.example.com.  IN      A       120     192.0.2.2
+2      foo1.svcb.example.com.  IN      RRSIG   120     A 13 4 120 [expiry] [inception] [keytag] example.com. ...
+2      foo1.svcb.example.com.  IN      RRSIG   120     SVCB 13 4 120 [expiry] [inception] [keytag] example.com. ...
+2      foo1.svcb.example.com.  IN      SVCB    120     1 . alpn=h2,h3
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='foo.svcb.example.com.', qtype=SVCB
diff --git a/regression-tests/tests/svcb-servicemode/command b/regression-tests/tests/svcb-servicemode/command
new file mode 100755 (executable)
index 0000000..fa0d5f9
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cleandig bar.svcb.example.com SVCB dnssec
\ No newline at end of file
diff --git a/regression-tests/tests/svcb-servicemode/description b/regression-tests/tests/svcb-servicemode/description
new file mode 100644 (file)
index 0000000..bdeb1a3
--- /dev/null
@@ -0,0 +1 @@
+Ensure SVCB Aliasmodes are followed
\ No newline at end of file
diff --git a/regression-tests/tests/svcb-servicemode/expected_result b/regression-tests/tests/svcb-servicemode/expected_result
new file mode 100644 (file)
index 0000000..b8f811b
--- /dev/null
@@ -0,0 +1,8 @@
+0      bar.svcb.example.com.   IN      SVCB    120     1 . alpn=h2
+0      bar.svcb.example.com.   IN      SVCB    120     3 . alpn=h3 port=1500
+2      .       IN      OPT     32768   
+2      bar.svcb.example.com.   IN      A       120     192.0.2.1
+2      bar.svcb.example.com.   IN      AAAA    120     2001:db8::3:1
+2      bar.svcb.example.com.   IN      AAAA    120     2001:db8::3:4
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='bar.svcb.example.com.', qtype=SVCB
diff --git a/regression-tests/tests/svcb-servicemode/expected_result.dnssec b/regression-tests/tests/svcb-servicemode/expected_result.dnssec
new file mode 100644 (file)
index 0000000..3faec47
--- /dev/null
@@ -0,0 +1,11 @@
+0      bar.svcb.example.com.   IN      RRSIG   120     SVCB 13 4 120 [expiry] [inception] [keytag] example.com. ...
+0      bar.svcb.example.com.   IN      SVCB    120     1 . alpn=h2
+0      bar.svcb.example.com.   IN      SVCB    120     3 . alpn=h3 port=1500
+2      .       IN      OPT     32768   
+2      bar.svcb.example.com.   IN      A       120     192.0.2.1
+2      bar.svcb.example.com.   IN      AAAA    120     2001:db8::3:1
+2      bar.svcb.example.com.   IN      AAAA    120     2001:db8::3:4
+2      bar.svcb.example.com.   IN      RRSIG   120     A 13 4 120 [expiry] [inception] [keytag] example.com. ...
+2      bar.svcb.example.com.   IN      RRSIG   120     AAAA 13 4 120 [expiry] [inception] [keytag] example.com. ...
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='bar.svcb.example.com.', qtype=SVCB
index ad67b9da23cd905e809b53d4ccf1e0c8ffadeafd..c1e82902fb54db78d13eaefc99fdd7942ff6be54 100644 (file)
@@ -20208,3 +20208,15 @@ cname-to-insecure  IN      CNAME   www.insecure.dnssec-parent.com.
 
 ;
 largettl       1073741724 IN TXT "this record has a huge TTL"
+
+; SVCB record
+foo.svcb IN SVCB 0 foo1.svcb.example.com. ; AliasMode
+foo1.svcb IN SVCB 1 . alpn=h2,h3
+foo.svcb IN A 192.0.2.1 ; Should not show up in additional
+foo1.svcb IN A 192.0.2.2 ; Should show up in additional
+
+bar.svcb IN SVCB 1 . alpn=h2
+bar.svcb IN SVCB 3 . alpn=h3 port=1500
+bar.svcb IN AAAA 2001:db8::3:1
+bar.svcb IN AAAA 2001:db8::3:4
+bar.svcb IN A 192.0.2.1
\ No newline at end of file