diff --git a/outbound/dns.go b/outbound/dns.go index 0f003377..df32a019 100644 --- a/outbound/dns.go +++ b/outbound/dns.go @@ -270,7 +270,8 @@ func truncateDNSMessage(response *mDNS.Msg, maxLen int) *mDNS.Msg { if responseLen <= maxLen { return response } - response = response.Copy() + newResponse := *response + response = &newResponse for len(response.Answer) > 0 && responseLen > maxLen { response.Answer = response.Answer[:len(response.Answer)-1] response.Truncated = true