Skip to content

Commit 8d43ebf

Browse files
committed
EmptyResponseFromMessage: always set the RA flag, copy the RD flag
1 parent 3f551f4 commit 8d43ebf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dnscrypt-proxy/dnsutils.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ func EmptyResponseFromMessage(srcMsg *dns.Msg) *dns.Msg {
1616
dstMsg := dns.Msg{MsgHdr: srcMsg.MsgHdr, Compress: true}
1717
dstMsg.Question = srcMsg.Question
1818
dstMsg.Response = true
19-
if srcMsg.RecursionDesired {
20-
dstMsg.RecursionAvailable = true
21-
}
22-
dstMsg.RecursionDesired = false
19+
dstMsg.RecursionAvailable = true
20+
dstMsg.RecursionDesired = srcMsg.RecursionDesired
2321
dstMsg.CheckingDisabled = false
2422
dstMsg.AuthenticatedData = false
2523
if edns0 := srcMsg.IsEdns0(); edns0 != nil {

0 commit comments

Comments
 (0)