diff --git a/types.go b/types.go index 26309725..c8658b34 100644 --- a/types.go +++ b/types.go @@ -353,7 +353,7 @@ func (rr *X25) String() string { type RT struct { Hdr RR_Header Preference uint16 - Host string `dns:"cdomain-name"` + Host string `dns:"domain-name"` // RFC 3597 prohibits compressing records not defined in RFC 1035. } func (rr *RT) String() string { diff --git a/zmsg.go b/zmsg.go index 057e5e6a..27887a77 100644 --- a/zmsg.go +++ b/zmsg.go @@ -1070,7 +1070,7 @@ func (rr *RT) pack(msg []byte, off int, compression map[string]int, compress boo if err != nil { return off, err } - off, err = PackDomainName(rr.Host, msg, off, compression, compress) + off, err = PackDomainName(rr.Host, msg, off, compression, false) if err != nil { return off, err } diff --git a/ztypes.go b/ztypes.go index a527d08a..71662b7b 100644 --- a/ztypes.go +++ b/ztypes.go @@ -525,7 +525,7 @@ func (rr *RRSIG) len(off int, compression map[string]struct{}) int { func (rr *RT) len(off int, compression map[string]struct{}) int { l := rr.Hdr.len(off, compression) l += 2 // Preference - l += domainNameLen(rr.Host, off+l, compression, true) + l += domainNameLen(rr.Host, off+l, compression, false) return l } func (rr *SMIMEA) len(off int, compression map[string]struct{}) int {