From 69e8db7bbe12e72b34a7b61285b769f9c5075d37 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 12 Feb 2019 13:29:12 +0100 Subject: [PATCH] include question section in dns response --- proxy/dns/dns.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/proxy/dns/dns.go b/proxy/dns/dns.go index 741f128f8..79343c9d0 100644 --- a/proxy/dns/dns.go +++ b/proxy/dns/dns.go @@ -216,6 +216,13 @@ func (h *Handler) handleIPQuery(id uint16, qType dnsmessage.Type, domain string, RCode: dnsmessage.RCodeSuccess, Response: true, }) + builder.EnableCompression() + common.Must(builder.StartQuestions()) + common.Must(builder.Question(dnsmessage.Question{ + Name: dnsmessage.MustNewName(domain), + Class: dnsmessage.ClassINET, + Type: qType, + })) common.Must(builder.StartAnswers()) rHeader := dnsmessage.ResourceHeader{Name: dnsmessage.MustNewName(domain), Class: dnsmessage.ClassINET, TTL: 600}