aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/setup_reverse_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-10-24 10:16:03 +0100
committerGravatar GitHub <noreply@github.com> 2017-10-24 10:16:03 +0100
commitfcd0342e42a8be5a1cfe41304f0a8099b1bc0e06 (patch)
tree5fa74c98e7a4c729cd8597f477c14a41ca7503cc /plugin/kubernetes/setup_reverse_test.go
parent5f813bcc216642021ae50b07a8aead2e73e9d059 (diff)
downloadcoredns-fcd0342e42a8be5a1cfe41304f0a8099b1bc0e06.tar.gz
coredns-fcd0342e42a8be5a1cfe41304f0a8099b1bc0e06.tar.zst
coredns-fcd0342e42a8be5a1cfe41304f0a8099b1bc0e06.zip
CIDR query routing (#1159)
* core: allow all CIDR ranges in zone specifications Allow (e.g.) a v4 reverse on a /17. If a zone is specified in such a way a FilterFunc is set in the config. This filter is checked against incoming queries. For all other queries this adds a 'x != nil' check which will not impact performace too much. Benchmark function is added as well to check for this as wel. Add multiple tests in tests/server_reverse_test.go. Benchmark shows in the non-reverse case this hardly impact the speed: ~~~ classless: pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1431 ns/op 16 B/op 1 allocs/op pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1429 ns/op 16 B/op 1 allocs/op master: pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1412 ns/op 16 B/op 1 allocs/op pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1429 ns/op 16 B/op 1 allocs/op ~~~ * README.md updates
Diffstat (limited to 'plugin/kubernetes/setup_reverse_test.go')
-rw-r--r--plugin/kubernetes/setup_reverse_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/kubernetes/setup_reverse_test.go b/plugin/kubernetes/setup_reverse_test.go
index ed51a7410..626874e6d 100644
--- a/plugin/kubernetes/setup_reverse_test.go
+++ b/plugin/kubernetes/setup_reverse_test.go
@@ -12,7 +12,7 @@ func TestKubernetesParseReverseZone(t *testing.T) {
expectedZones []string // expected count of defined zones.
}{
{`kubernetes coredns.local 10.0.0.0/16`, []string{"coredns.local.", "0.10.in-addr.arpa."}},
- {`kubernetes coredns.local 10.0.0.0/17`, []string{"coredns.local.", "10.0.0.0/17."}},
+ {`kubernetes coredns.local 10.0.0.0/17`, []string{"coredns.local.", "0.10.in-addr.arpa."}},
}
for i, tc := range tests {