Rename NULL's Anything field to Data (#880)

This commit is contained in:
Tom Thorogood 2019-01-03 21:03:38 +10:30 committed by GitHub
parent 2533d75276
commit bfd648e102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -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.

View File

@ -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

View File

@ -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
}

View File

@ -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}