Rename NULL's Anything field to Data (#880)
This commit is contained in:
parent
2533d75276
commit
bfd648e102
6
types.go
6
types.go
|
@ -243,13 +243,13 @@ func (rr *ANY) String() string { return rr.Hdr.String() }
|
|||
|
||||
// NULL RR. See RFC 1035.
|
||||
type NULL struct {
|
||||
Hdr RR_Header
|
||||
Anything string `dns:"any"`
|
||||
Hdr RR_Header
|
||||
Data string `dns:"any"`
|
||||
}
|
||||
|
||||
func (rr *NULL) String() string {
|
||||
// There is no presentation format; prefix string with a comment.
|
||||
return ";" + rr.Hdr.String() + rr.Anything
|
||||
return ";" + rr.Hdr.String() + rr.Data
|
||||
}
|
||||
|
||||
// CNAME RR. See RFC 1034.
|
||||
|
|
|
@ -619,7 +619,7 @@ func isDuplicateNSEC3PARAM(r1, r2 *NSEC3PARAM) bool {
|
|||
}
|
||||
|
||||
func isDuplicateNULL(r1, r2 *NULL) bool {
|
||||
if r1.Anything != r2.Anything {
|
||||
if r1.Data != r2.Data {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
4
zmsg.go
4
zmsg.go
|
@ -807,7 +807,7 @@ func (rr *NULL) pack(msg []byte, off int, compression compressionMap, compress b
|
|||
if err != nil {
|
||||
return headerEnd, off, err
|
||||
}
|
||||
off, err = packStringAny(rr.Anything, msg, off)
|
||||
off, err = packStringAny(rr.Data, msg, off)
|
||||
if err != nil {
|
||||
return headerEnd, off, err
|
||||
}
|
||||
|
@ -2571,7 +2571,7 @@ func unpackNULL(h RR_Header, msg []byte, off int) (RR, int, error) {
|
|||
rdStart := off
|
||||
_ = rdStart
|
||||
|
||||
rr.Anything, off, err = unpackStringAny(msg, off, rdStart+int(rr.Hdr.Rdlength))
|
||||
rr.Data, off, err = unpackStringAny(msg, off, rdStart+int(rr.Hdr.Rdlength))
|
||||
if err != nil {
|
||||
return rr, off, err
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ func (rr *NSEC3PARAM) len(off int, compression map[string]struct{}) int {
|
|||
}
|
||||
func (rr *NULL) len(off int, compression map[string]struct{}) int {
|
||||
l := rr.Hdr.len(off, compression)
|
||||
l += len(rr.Anything)
|
||||
l += len(rr.Data)
|
||||
return l
|
||||
}
|
||||
func (rr *OPENPGPKEY) len(off int, compression map[string]struct{}) int {
|
||||
|
@ -791,7 +791,7 @@ func (rr *NSEC3PARAM) copy() RR {
|
|||
return &NSEC3PARAM{rr.Hdr, rr.Hash, rr.Flags, rr.Iterations, rr.SaltLength, rr.Salt}
|
||||
}
|
||||
func (rr *NULL) copy() RR {
|
||||
return &NULL{rr.Hdr, rr.Anything}
|
||||
return &NULL{rr.Hdr, rr.Data}
|
||||
}
|
||||
func (rr *OPENPGPKEY) copy() RR {
|
||||
return &OPENPGPKEY{rr.Hdr, rr.PublicKey}
|
||||
|
|
Loading…
Reference in New Issue