diff --git a/bin/tests/system/doth/example.axfr.good b/bin/tests/system/doth/example.axfr.good index a5ec1f2570..4561d59b1e 100644 --- a/bin/tests/system/doth/example.axfr.good +++ b/bin/tests/system/doth/example.axfr.good @@ -2548,6 +2548,7 @@ ds01.example. 3600 IN NS ns42.example. ds01.example. 3600 IN DS 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13 ds02.example. 3600 IN NS ns43.example. ds02.example. 3600 IN DS 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390 +dsync01.example. 3600 IN DSYNC CDS NOTIFY 53 . eid01.example. 3600 IN EID 1289AB eui48.example. 3600 IN EUI48 01-23-45-67-89-ab eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef diff --git a/bin/tests/system/doth/example8.axfr.good b/bin/tests/system/doth/example8.axfr.good index 39d70e2021..3e20efe43d 100644 --- a/bin/tests/system/doth/example8.axfr.good +++ b/bin/tests/system/doth/example8.axfr.good @@ -2548,6 +2548,7 @@ ds01.example8. 3600 IN DS 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FA ds01.example8. 3600 IN NS ns42.example8. ds02.example8. 3600 IN DS 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390 ds02.example8. 3600 IN NS ns43.example8. +dsync01.example8. 3600 IN DSYNC CDS NOTIFY 53 . eid01.example8. 3600 IN EID 1289AB eui48.example8. 3600 IN EUI48 01-23-45-67-89-ab eui64.example8. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef diff --git a/bin/tests/system/genzone.sh b/bin/tests/system/genzone.sh index 892209230b..4920bc5c91 100644 --- a/bin/tests/system/genzone.sh +++ b/bin/tests/system/genzone.sh @@ -389,7 +389,10 @@ svcb1 SVCB 1 . port=60 https0 HTTPS 0 example.net. https1 HTTPS 1 . port=60 -; type 66 -- 98 (unassigned) +; type 66 +dsync01 DSYNC CDS NOTIFY 53 . + +; type 68 -- 98 (unassigned) ; type 99 spf01 SPF "v=spf1 -all" diff --git a/bin/tests/system/xfer/dig1.good b/bin/tests/system/xfer/dig1.good index d44fcda9d2..4cad0c9f02 100644 --- a/bin/tests/system/xfer/dig1.good +++ b/bin/tests/system/xfer/dig1.good @@ -49,6 +49,7 @@ ds01.example. 3600 IN DS 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAF ds01.example. 3600 IN NS ns42.example. ds02.example. 3600 IN DS 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390 ds02.example. 3600 IN NS ns43.example. +dsync01.example. 3600 IN DSYNC CDS NOTIFY 53 . eid01.example. 3600 IN EID 1289AB eui48.example. 3600 IN EUI48 01-23-45-67-89-ab eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef diff --git a/bin/tests/system/xfer/dig2.good b/bin/tests/system/xfer/dig2.good index 4b090f83fe..795381be59 100644 --- a/bin/tests/system/xfer/dig2.good +++ b/bin/tests/system/xfer/dig2.good @@ -49,6 +49,7 @@ ds01.example. 3600 IN NS ns42.example. ds01.example. 3600 IN DS 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13 ds02.example. 3600 IN NS ns43.example. ds02.example. 3600 IN DS 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390 +dsync01.example. 3600 IN DSYNC CDS NOTIFY 53 . eid01.example. 3600 IN EID 1289AB eui48.example. 3600 IN EUI48 01-23-45-67-89-ab eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef diff --git a/tests/dns/rdata_test.c b/tests/dns/rdata_test.c index 83b4711d47..70b097dd85 100644 --- a/tests/dns/rdata_test.c +++ b/tests/dns/rdata_test.c @@ -1707,6 +1707,113 @@ ISC_RUN_TEST_IMPL(ds) { dns_rdatatype_ds, sizeof(dns_rdata_ds_t)); } +/* + * DSYNC tests. + * + * draft-ietf-dnsop-generalized-notify-09 + * + * 2.1. Wire Format + * + * The DSYNC RDATA wire format is encoded as follows: + * + * 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | RRtype | Scheme | Port + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Target ... / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/ + * + * RRtype The type of generalized NOTIFY that this DSYNC RR defines the + * desired target address for (see "Resource Record (RR) TYPEs" IANA + * registry). For now, only CDS and CSYNC are supported values, with + * the former indicating an updated CDS or CDNSKEY record set. + * + * Scheme The mode used for contacting the desired notification + * address. This is an 8-bit unsigned integer. Records with value 0 + * (null scheme) are ignored by consumers. Value 1 is described in + * this document, and values 128-255 are reserved for private use. + * All other values are currently unassigned. + * + * Port The port on the target host of the notification service. This + * is a 16-bit unsigned integer in network byte order. Records with + * value 0 are ignored by consumers. + * + * Target The fully-qualified, uncompressed domain name of the target + * host providing the service of listening for generalized + * notifications of the specified type. This name MUST resolve to + * one or more address records. + * + * 2.2. Presentation Format + * + * The presentation format of the RDATA portion is as follows: + * + * * The RRtype field is represented as a mnemonic from the "Resource + * Record (RR) TYPEs" registry. + * + * * The Scheme field is represented by its mnemonic if assigned (see + * Section 6.2), otherwise as an unsigned decimal integer. + * + * * The Port field is represented as an unsigned decimal integer. + * + * * The Target field is represented as a ([RFC1035], + * Section 5.1). + */ +ISC_RUN_TEST_IMPL(dsync) { + text_ok_t text_ok[] = { + /* + * Invalid, empty record. + */ + TEXT_INVALID(""), + /* + * Known type and known scheme. + */ + TEXT_VALID("CDS NOTIFY 0 example.com"), + /* + * Known type and unknown scheme. + */ + TEXT_VALID("CDS 3 0 example.com"), + /* + * Unknown type and known scheme. + */ + TEXT_VALID("TYPE1000 NOTIFY 0 example.com"), + /* + * Unknown type and unknown scheme. + */ + TEXT_VALID("TYPE1000 3 0 example.com"), + /* + * Unknown type and unknown scheme, max port. + */ + TEXT_VALID("TYPE1000 3 65535 example.com"), + /* + * Unknown type and max scheme, max port. + */ + TEXT_VALID("TYPE64000 255 65535 example.com"), + /* + * Invalid type and max scheme, max port. + */ + TEXT_INVALID("INVALID 255 65536 example.com"), + /* + * Unknown type and too big scheme, max port. + */ + TEXT_INVALID("TYPE1000 256 65536 example.com"), + /* + * Unknown type and unknown scheme, port too big. + */ + TEXT_INVALID("TYPE1000 3 65536 example.com"), + /* + * Unknown type and bad scheme, max port. + */ + TEXT_INVALID("TYPE1000 UNKNOWN 65535 example.com"), + /* + * Sentinel. + */ + TEXT_SENTINEL() + }; + check_rdata(text_ok, NULL, NULL, false, dns_rdataclass_in, + dns_rdatatype_dsync, sizeof(dns_rdata_dsync_t)); +} + /* * EDNS Client Subnet tests. *