From: Pieter Lexis Date: Wed, 23 Sep 2020 14:56:49 +0000 (+0200) Subject: Add some regression tests for SVCB X-Git-Tag: auth-4.4.0-alpha1~2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad6ab1bcf1db16a5d8de9e87ffe8204458265b20;p=thirdparty%2Fpdns.git Add some regression tests for SVCB --- diff --git a/modules/tinydnsbackend/data b/modules/tinydnsbackend/data index aa5b363b5f..2944749db1 100644 --- a/modules/tinydnsbackend/data +++ b/modules/tinydnsbackend/data @@ -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 @@ -20101,8 +20104,14 @@ +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 diff --git a/modules/tinydnsbackend/data.cdb b/modules/tinydnsbackend/data.cdb index b52b767471..022974b84f 100644 Binary files a/modules/tinydnsbackend/data.cdb and b/modules/tinydnsbackend/data.cdb differ diff --git a/regression-tests.nobackend/tinydns-data-check/expected_result b/regression-tests.nobackend/tinydns-data-check/expected_result index 70ebd4a567..2fb50a0f9c 100644 --- a/regression-tests.nobackend/tinydns-data-check/expected_result +++ b/regression-tests.nobackend/tinydns-data-check/expected_result @@ -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 diff --git a/regression-tests/tests/ent-asterisk/expected_result.dnssec b/regression-tests/tests/ent-asterisk/expected_result.dnssec index e3412a799e..fcbcc4b846 100644 --- a/regression-tests/tests/ent-asterisk/expected_result.dnssec +++ b/regression-tests/tests/ent-asterisk/expected_result.dnssec @@ -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 index 0000000000..a1fd95a7b5 --- /dev/null +++ b/regression-tests/tests/svcb-aliasmode/command @@ -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 index 0000000000..bdeb1a3c35 --- /dev/null +++ b/regression-tests/tests/svcb-aliasmode/description @@ -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 index 0000000000..dc76059243 --- /dev/null +++ b/regression-tests/tests/svcb-aliasmode/expected_result @@ -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 index 0000000000..83d814f887 --- /dev/null +++ b/regression-tests/tests/svcb-aliasmode/expected_result.dnssec @@ -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 index 0000000000..fa0d5f9bc3 --- /dev/null +++ b/regression-tests/tests/svcb-servicemode/command @@ -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 index 0000000000..bdeb1a3c35 --- /dev/null +++ b/regression-tests/tests/svcb-servicemode/description @@ -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 index 0000000000..b8f811b39e --- /dev/null +++ b/regression-tests/tests/svcb-servicemode/expected_result @@ -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 index 0000000000..3faec47c51 --- /dev/null +++ b/regression-tests/tests/svcb-servicemode/expected_result.dnssec @@ -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 diff --git a/regression-tests/zones/example.com b/regression-tests/zones/example.com index ad67b9da23..c1e82902fb 100644 --- a/regression-tests/zones/example.com +++ b/regression-tests/zones/example.com @@ -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