Copy CD bit too

This commit is contained in:
Miek Gieben 2014-08-05 21:17:24 +01:00
parent b0e216a0ee
commit 22f120cfe8
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ const hexDigit = "0123456789abcdef"
func (dns *Msg) SetReply(request *Msg) *Msg {
dns.Id = request.Id
dns.RecursionDesired = request.RecursionDesired // Copy rd bit
dns.CheckingDisabled = request.CheckingDisabled // Copy cd bit
dns.Response = true
dns.Opcode = OpcodeQuery
dns.Rcode = RcodeSuccess