Skip to content

Commit 361c7fb

Browse files
committed
update const name
1 parent 52317e9 commit 361c7fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dns/dnsmessage/message.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,8 +1890,8 @@ func unpackBytes(msg []byte, off int, field []byte) (int, error) {
18901890
}
18911891

18921892
const (
1893-
maxHumanEncodedNameLen = 254
1894-
nameLen = 255
1893+
maxDotEncodedNameLen = 254
1894+
nameLen = 255
18951895
)
18961896

18971897
// A Name is a non-encoded domain name. It is used instead of strings to avoid
@@ -1940,7 +1940,7 @@ func (n *Name) GoString() string {
19401940
func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
19411941
oldMsg := msg
19421942

1943-
if n.Length > maxHumanEncodedNameLen {
1943+
if n.Length > maxDotEncodedNameLen {
19441944
return nil, errNameTooLong
19451945
}
19461946

@@ -2065,7 +2065,7 @@ Loop:
20652065
if len(name) == 0 {
20662066
name = append(name, '.')
20672067
}
2068-
if len(name) > maxHumanEncodedNameLen {
2068+
if len(name) > maxDotEncodedNameLen {
20692069
return off, errNameTooLong
20702070
}
20712071
n.Length = uint8(len(name))

0 commit comments

Comments
 (0)