aboutsummaryrefslogtreecommitdiff
path: root/middleware/etcd/handler.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-03-27 07:37:23 +0100
committerGravatar Miek Gieben <miek@miek.nl> 2016-03-28 10:15:05 +0100
commit5387c162c994d7d81ccf21c8c8f9d9959ed27240 (patch)
treef10c1777f3cd96a42c67b8c955c737c88aa58744 /middleware/etcd/handler.go
parent9eeb2b02595664e861ae639933555b3ed507c93d (diff)
downloadcoredns-5387c162c994d7d81ccf21c8c8f9d9959ed27240.tar.gz
coredns-5387c162c994d7d81ccf21c8c8f9d9959ed27240.tar.zst
coredns-5387c162c994d7d81ccf21c8c8f9d9959ed27240.zip
Implement a DNS zone
Full implementation, DNS (and in the future DNSSEC). Returns answer in a hopefully standards compliant way. Testing with my miek.nl zone are included as well. This should correctly handle nodata, nxdomain and cnames.
Diffstat (limited to 'middleware/etcd/handler.go')
-rw-r--r--middleware/etcd/handler.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/middleware/etcd/handler.go b/middleware/etcd/handler.go
index b988e7270..a687d54ad 100644
--- a/middleware/etcd/handler.go
+++ b/middleware/etcd/handler.go
@@ -14,7 +14,8 @@ func (e Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
return e.Next.ServeDNS(ctx, w, r)
}
- m := state.AnswerMessage()
+ m := new(dns.Msg)
+ m.SetReply(r)
m.Authoritative, m.RecursionAvailable, m.Compress = true, true, true
var (