Commit graph

3 commits

Author SHA1 Message Date
Miek Gieben
74ef6e00f1
transfer: reply with refused (#4510)
* transfer: reply with refused

When the *transfer* plugin is not loaded and of the handlers will still
see the AXFR/IXFR request because it is not intercepted.

They need to reply with REFUSED in that case. Update file, auto and k8s
to do this. Add testcase in the file plugin.

Ideally *erratic* should be moved over as well, but maybe that's
*erratic*

This is a bug fix.

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

* import path

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-09 12:17:34 -08:00
Miek Gieben
01e13c622e plugin/file: New zone should have zero records (#3025)
After calling NewZone the number of records should be zero, but due to
how zone.All() was implemented so empty RRs would be added. This then
fails the == 0 check in xfr.go and put nil in the slice, this then
subsequently panics on the Len().

Fix this making All() smarter when adding records. Added little test to
enfore this.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-20 11:13:43 -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
Renamed from middleware/file/xfr_test.go (Browse further)