|
|
@@ -14,6 +14,7 @@ package dnsmessage
|
|
|
|
|
|
import (
|
|
|
"errors"
|
|
|
+ "fmt"
|
|
|
)
|
|
|
|
|
|
// Message formats
|
|
|
@@ -2140,7 +2141,7 @@ func unpackResourceBody(msg []byte, off int, hdr ResourceHeader) (ResourceBody,
|
|
|
return nil, off, &nestedError{name + " record", err}
|
|
|
}
|
|
|
if r == nil {
|
|
|
- return nil, off, errors.New("invalid resource type: " + string(rune(hdr.Type)+'0'))
|
|
|
+ return nil, off, fmt.Errorf("invalid resource type: %d", hdr.Type)
|
|
|
}
|
|
|
return r, off + int(hdr.Length), nil
|
|
|
}
|