This commit is contained in:
Miek Gieben 2012-08-25 22:40:32 +02:00
parent 8d56ace2ed
commit 7444d67bfd
1 changed files with 3 additions and 0 deletions

3
msg.go
View File

@ -1329,6 +1329,9 @@ func (dns *Msg) String() string {
func (dns *Msg) Len() int {
// Message header is always 12 bytes
l := 12
// All ownernames can be compressed at any time
// TODO(mg): if Compress=true do with compression
for i := 0; i < len(dns.Question); i++ {
l += dns.Question[i].Len()
}