Commit graph

11 commits

Author SHA1 Message Date
Miek Gieben
225cdd1ca3 Add AXFR test
Test shouldTransfer by upping a testserver and sending the SOA query.

Remove state from DefaultErrorHandler and just get it from the request.

Add more logging to show what is going on.



This also adds the infrastructure for future tests.
2016-04-06 22:29:33 +01:00
Miek Gieben
b9a6518bb0 use dropped for this metric 2016-04-06 15:51:06 +00:00
Miek Gieben
7e05aa8069 Enable monitoring for non middleware
If monitoring is enabled for one zone, also enable it for when the

server reports REFUSED. Normally the metrics are only enabled if

you enter the middleware, with this you'll see REFUSED queries.

Each of these are reported agains the root zone otherwise
2016-04-06 14:13:29 +01:00
Miek Gieben
6445a3f2f0 Cleanup docs and the chaos middleware
Make the CH middleware actually work. Needs a bit of a hack to route

the fake version.bind and friends zone to the correct handler. Fiddle

with the order in directive.go so that CH queries get logged as well.



Secondly add class rewriting to the rewrite middleware handler and also

log the class by default.
2016-04-04 15:45:17 +01:00
Miek Gieben
3b25bfd7ae Fix Corefile parsing
Fix some file/secondary issues when parsing a Corefile, also allow

for multiple origins to be specified. Also don't fail on startup when

a zonetransfer fails.



Fixes: #54
2016-04-03 15:52:23 +01:00
Miek Gieben
4a2a95561f Answer REFUSED when we don't host the zone
Change from SERVFAIL to diff. between error and no such zone hosted.

Fixes: #68
2016-04-02 18:11:56 +01:00
Miek Gieben
47fca9a8fc Proxy cleanups
Remove things not supported, fix docs.
2016-03-19 20:53:37 +00:00
Miek Gieben
ec84cb1270 Random fixes and make servfail the special return code 2016-03-19 20:17:44 +00:00
Miek Gieben
33f00b5a3a Fix failing on startup
When we cannot bind to the port, return an error which will make
CoreDNS fail startup. Still a bit hackish, but good enough.
2016-03-19 19:38:54 +00:00
Miek Gieben
f907311cdf Use context.Context
Rename the old Context to State and use context.Context in the
middleware for intra-middleware communication and more.
2016-03-19 07:32:50 +00:00
Miek Gieben
3ec0d9fe6b First commit 2016-03-18 20:57:35 +00:00