From 3180e5045978ce9fef524e98a66c0fdc7d7b783c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 23 Jan 2026 13:32:41 +1100 Subject: [PATCH 1/2] dsync_from struct produced an invalid record uint16_tobuffer was used instead of uint8_tobuffer when adding the scheme to the buffer. This produced a record that was one octet too long. This has been fixed. --- lib/dns/rdata/generic/dsync_66.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/rdata/generic/dsync_66.c b/lib/dns/rdata/generic/dsync_66.c index 0242da3ed0..ca121fb78d 100644 --- a/lib/dns/rdata/generic/dsync_66.c +++ b/lib/dns/rdata/generic/dsync_66.c @@ -238,7 +238,7 @@ fromstruct_dsync(ARGS_FROMSTRUCT) { UNUSED(rdclass); RETERR(uint16_tobuffer(dsync->type, target)); - RETERR(uint16_tobuffer(dsync->scheme, target)); + RETERR(uint8_tobuffer(dsync->scheme, target)); RETERR(uint16_tobuffer(dsync->port, target)); dns_name_toregion(&dsync->target, ®ion); return isc_buffer_copyregion(target, ®ion); From 2159f74a1f3b7498a59516375be928109ec847e2 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 23 Jan 2026 13:38:16 +1100 Subject: [PATCH 2/2] Fix dsync unit test The dsync unit test was not being run and the domain names in the test data should have been fully qualified. --- tests/dns/rdata_test.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/dns/rdata_test.c b/tests/dns/rdata_test.c index 2ef35f1b90..8601106f9c 100644 --- a/tests/dns/rdata_test.c +++ b/tests/dns/rdata_test.c @@ -1793,43 +1793,43 @@ ISC_RUN_TEST_IMPL(dsync) { /* * Known type and known scheme. */ - TEXT_VALID("CDS NOTIFY 0 example.com"), + TEXT_VALID("CDS NOTIFY 0 example.com."), /* * Known type and unknown scheme. */ - TEXT_VALID("CDS 3 0 example.com"), + TEXT_VALID("CDS 3 0 example.com."), /* * Unknown type and known scheme. */ - TEXT_VALID("TYPE1000 NOTIFY 0 example.com"), + TEXT_VALID("TYPE1000 NOTIFY 0 example.com."), /* * Unknown type and unknown scheme. */ - TEXT_VALID("TYPE1000 3 0 example.com"), + TEXT_VALID("TYPE1000 3 0 example.com."), /* * Unknown type and unknown scheme, max port. */ - TEXT_VALID("TYPE1000 3 65535 example.com"), + TEXT_VALID("TYPE1000 3 65535 example.com."), /* * Unknown type and max scheme, max port. */ - TEXT_VALID("TYPE64000 255 65535 example.com"), + TEXT_VALID("TYPE64000 255 65535 example.com."), /* * Invalid type and max scheme, max port. */ - TEXT_INVALID("INVALID 255 65536 example.com"), + TEXT_INVALID("INVALID 255 65536 example.com."), /* * Unknown type and too big scheme, max port. */ - TEXT_INVALID("TYPE1000 256 65536 example.com"), + TEXT_INVALID("TYPE1000 256 65536 example.com."), /* * Unknown type and unknown scheme, port too big. */ - TEXT_INVALID("TYPE1000 3 65536 example.com"), + TEXT_INVALID("TYPE1000 3 65536 example.com."), /* * Unknown type and bad scheme, max port. */ - TEXT_INVALID("TYPE1000 UNKNOWN 65535 example.com"), + TEXT_INVALID("TYPE1000 UNKNOWN 65535 example.com."), /* * Sentinel. */ @@ -3376,6 +3376,7 @@ ISC_TEST_ENTRY(csync) ISC_TEST_ENTRY(dnskey) ISC_TEST_ENTRY(doa) ISC_TEST_ENTRY(ds) +ISC_TEST_ENTRY(dsync) ISC_TEST_ENTRY(eid) ISC_TEST_ENTRY(hip) ISC_TEST_ENTRY(https_svcb)