Commit graph

59 commits

Author SHA1 Message Date
Pat Moroney
25367a4329 remove the defer 2017-10-24 14:28:41 -06:00
Pat Moroney
53d9bff707 read lock around ReadHosts() 2017-10-24 13:46:58 -06:00
Pat Moroney
680e6bd5c3 move ReadHosts out of the lock 2017-10-24 10:34:16 -06:00
Pat Moroney
7ad99d0d36 Fix locking for hosts plugin 2017-10-24 10:27:07 -06:00
Miek Gieben
427aed6f5b doc update (#1140)
* doc update

Go through all README and fix mistakes, extend example and let more
corefile snippets be test for validity.

* Cant use spefic addr in test
2017-10-10 09:39:35 +02:00
John Belamaric
37d06f382a Warn if the hosts file is a directory (#1126) 2017-09-29 22:28:37 +01:00
Miek Gieben
284061eee7 pkg: add dnstest (#1098)
Add a full test server impl in this new package + tests. Move
dnsrecorder into this package as well and finish up the commented out
tests that were left in the old dnsrecorder package.

Update all callers and tests.
2017-09-21 15:15:47 +01:00
Yong Tang
7109c6715c Add inline support for middleware/hosts (#1072)
This fix add inline support for middleware/hosts so that
it is possible to specify hosts file insides the Corefile:
```
hosts inline example.org {
    10.0.0.1 example.org
    fallthrough
}
```

This fix fixes 999.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-09-21 04:18:13 -07:00
Miek Gieben
d8714e64e4 Remove the word middleware (#1067)
* Rename middleware to plugin

first pass; mostly used 'sed', few spots where I manually changed
text.

This still builds a coredns binary.

* fmt error

* Rename AddMiddleware to AddPlugin

* Readd AddMiddleware to remain backwards compat
2017-09-14 09:36:06 +01:00