diff --git a/dns/types/header.scm b/dns/types/header.scm index 9784c10d7c1782c73fb1003987c5c90dd7fd1ecc..8f4c3cc889461492014a98e6781133306399d523 100644 --- a/dns/types/header.scm +++ b/dns/types/header.scm @@ -58,7 +58,7 @@ (logand 7 (ash u16 -4)) ; z (logand #xF u16))) ; rcode -(define* (dns-header->bytes msg optional: (bv (make-bytevector 12))) +(define* (dns-header->bytes msg) (do (u16! (or (id msg) 0)) (u16! (encode-dns-header-flags msg)) diff --git a/dns/types/question.scm b/dns/types/question.scm index b41576d9f5517c43b758374091aa13dbdb1c4001..115d10898afb6b71db4729499d9cdb02c8ae2256 100644 --- a/dns/types/question.scm +++ b/dns/types/question.scm @@ -20,7 +20,7 @@ (define-record-type dns-question - (fields (name type: string?) ; string + (fields (name type: string?) (type type: (or u16? (assq (@ (dns enum) rr-types)))) (class default: 'IN type: (or u16? (assq (@ (dns enum) class-types))))))