Update client_truncate.go

Signed-off-by: songee2020 <61627765+songee2020@users.noreply.github.com>
This commit is contained in:
songee2020 2025-04-11 04:36:30 -03:00 committed by GitHub
parent e26bc2b537
commit 1ebc413cd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,7 @@ func TruncateDNSMessage(request *dns.Msg, response *dns.Msg, headroom int) (*buf
}
}
responseLen := response.Len()
response.Compress = true
if responseLen > maxLen {
copyResponse := *response
response = &copyResponse