diff --git a/command/agent/dns.go b/command/agent/dns.go index 9e2357dea4..66d595f311 100644 --- a/command/agent/dns.go +++ b/command/agent/dns.go @@ -180,6 +180,7 @@ func (d *DNSServer) handlePtr(resp dns.ResponseWriter, req *dns.Msg) { // Setup the message response m := new(dns.Msg) m.SetReply(req) + m.Compress = true m.Authoritative = true m.RecursionAvailable = (len(d.recursors) > 0) @@ -249,6 +250,7 @@ func (d *DNSServer) handleQuery(resp dns.ResponseWriter, req *dns.Msg) { // Setup the message response m := new(dns.Msg) m.SetReply(req) + m.Compress = true m.Authoritative = true m.RecursionAvailable = (len(d.recursors) > 0) @@ -785,6 +787,7 @@ func (d *DNSServer) handleRecurse(resp dns.ResponseWriter, req *dns.Msg) { var err error for _, recursor := range d.recursors { r, rtt, err = c.Exchange(req, recursor) + r.Compress = true if err == nil { // Forward the response d.logger.Printf("[DEBUG] dns: recurse RTT for %v (%v)", q, rtt) @@ -801,6 +804,7 @@ func (d *DNSServer) handleRecurse(resp dns.ResponseWriter, req *dns.Msg) { q, resp.RemoteAddr().String(), resp.RemoteAddr().Network()) m := &dns.Msg{} m.SetReply(req) + m.Compress = true m.RecursionAvailable = true m.SetRcode(req, dns.RcodeServerFailure) resp.WriteMsg(m)