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.

(cherry picked from commit 3180e50459)
This commit is contained in:
Mark Andrews 2026-01-23 13:32:41 +11:00 committed by Mark Andrews (GitLab job 6764530)
parent 963737fa3f
commit 19cf7bb2cd

View file

@ -237,7 +237,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, &region);
return isc_buffer_copyregion(target, &region);