diff --git a/types.go b/types.go index a779ca8a..4fd27218 100644 --- a/types.go +++ b/types.go @@ -330,7 +330,7 @@ func (rr *MX) String() string { type AFSDB struct { Hdr RR_Header Subtype uint16 - Hostname string `dns:"cdomain-name"` + Hostname string `dns:"domain-name"` } func (rr *AFSDB) String() string { diff --git a/zcompress.go b/zcompress.go index a2c09dd4..6391a350 100644 --- a/zcompress.go +++ b/zcompress.go @@ -109,9 +109,6 @@ func compressionLenHelperType(c map[string]int, r RR, initLen int) int { func compressionLenSearchType(c map[string]int, r RR) (int, bool, int) { switch x := r.(type) { - case *AFSDB: - k1, ok1, sz1 := compressionLenSearch(c, x.Hostname) - return k1, ok1, sz1 case *CNAME: k1, ok1, sz1 := compressionLenSearch(c, x.Target) return k1, ok1, sz1 diff --git a/zmsg.go b/zmsg.go index 0d1f6f4d..1a68f74d 100644 --- a/zmsg.go +++ b/zmsg.go @@ -42,7 +42,7 @@ func (rr *AFSDB) pack(msg []byte, off int, compression map[string]int, compress if err != nil { return off, err } - off, err = PackDomainName(rr.Hostname, msg, off, compression, compress) + off, err = PackDomainName(rr.Hostname, msg, off, compression, false) if err != nil { return off, err }