plugin/erratic: add axfr support (#1977)

* plugin/erratic: add axfr support

Add support for axfr. This to fix and test long standing axfr issues
that are hard to test if we don't support it directly in coredns.

The most intriguing feature is withholding the last SOA from a response
so the client needs to wait; drop (no reply) and delay is also
supported. All TTLs are set to zero.

Add simple tests that checks if first record is a SOA.

Signed-off-by: Miek Gieben <miek@miek.nl>

* more test coverage

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2018-07-20 10:25:54 +01:00
committed by GitHub
parent f3134da45e
commit d998aa6c25
4 changed files with 99 additions and 11 deletions

View File

@@ -10,7 +10,8 @@
The *erratic* plugin will respond to every A or AAAA query. For any other type it will return
a SERVFAIL response. The reply for A will return 192.0.2.53 (see [RFC
5737](https://tools.ietf.org/html/rfc5737),
for AAAA it returns 2001:DB8::53 (see [RFC 3849](https://tools.ietf.org/html/rfc3849)).
for AAAA it returns 2001:DB8::53 (see [RFC 3849](https://tools.ietf.org/html/rfc3849)) and for an
AXFR request it will respond with a small zone transfer.
*erratic* can also be used in conjunction with the *autopath* plugin. This is mostly to aid in
testing.
@@ -30,6 +31,8 @@ erratic {
* `delay`: delay 1 per **AMOUNT** of queries for **DURATION**, the default for **AMOUNT** is 2 and
the default for **DURATION** is 100ms.
In case of a zone transfer and truncate the final SOA record *isn't* added to the response.
## Health
This plugin implements dynamic health checking. For every dropped query it turns unhealthy.