aboutsummaryrefslogtreecommitdiff
path: root/middleware/etcd/stub_handler.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-08-08 19:18:55 -0700
committerGravatar GitHub <noreply@github.com> 2016-08-08 19:18:55 -0700
commitad76aef5fcf46dcdb50d8529bbf085a1578d3bda (patch)
treec662253762ad5f7ad1c4223023b2b1f1bba6b732 /middleware/etcd/stub_handler.go
parentc079de65b520bd7690c7ac057a38b404947f3909 (diff)
downloadcoredns-ad76aef5fcf46dcdb50d8529bbf085a1578d3bda.tar.gz
coredns-ad76aef5fcf46dcdb50d8529bbf085a1578d3bda.tar.zst
coredns-ad76aef5fcf46dcdb50d8529bbf085a1578d3bda.zip
Fix stubzone retention (#198)
Make the receiver a pointer so that the uptdateStubZones map update will retain the stubzones found, unlike the current case where the update will be applied and then promptly forgotten, because it is working on a copy. Add test/etcd_test.go to test a large part of the code. This didn't catch the chaos middleware hack though. The chaos middleware zones are now *not* automatically added. You have to take care of that by yourself (docs updates). When using debug queries and falling through to the next middleware in etcd, restore the original (with o-o.debug) query before passing it on.
Diffstat (limited to 'middleware/etcd/stub_handler.go')
-rw-r--r--middleware/etcd/stub_handler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/middleware/etcd/stub_handler.go b/middleware/etcd/stub_handler.go
index 514eff236..9d8778219 100644
--- a/middleware/etcd/stub_handler.go
+++ b/middleware/etcd/stub_handler.go
@@ -12,7 +12,7 @@ import (
// Stub wraps an Etcd. We have this type so that it can have a ServeDNS method.
type Stub struct {
- Etcd
+ *Etcd
Zone string // for what zone (and thus what nameservers are we called)
}