diff options
author | 2016-11-05 14:39:49 +0000 | |
---|---|---|
committer | 2016-11-05 14:39:49 +0000 | |
commit | 2cca527d9f17fd1595366545c47630bf35591873 (patch) | |
tree | d9cda7808a085db5705bdbbffc7bc8e36824356e /middleware/file/tree/less.go | |
parent | d6902cd7a1e70149268925453289681536b88195 (diff) | |
download | coredns-2cca527d9f17fd1595366545c47630bf35591873.tar.gz coredns-2cca527d9f17fd1595366545c47630bf35591873.tar.zst coredns-2cca527d9f17fd1595366545c47630bf35591873.zip |
middleware/file: fix delegations (#376)
Fix the delegation handling in the *file* and *dnssec* middleware.
Refactor tests a bit and show that they are failling.
Add a Tree printer, cleanups and tests.
Fix wildcard test - should get no answer from empty-non-terminal
Diffstat (limited to 'middleware/file/tree/less.go')
-rw-r--r-- | middleware/file/tree/less.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/middleware/file/tree/less.go b/middleware/file/tree/less.go index 595dc9213..3b8340088 100644 --- a/middleware/file/tree/less.go +++ b/middleware/file/tree/less.go @@ -11,7 +11,7 @@ import ( // The function orders names in DNSSEC canonical order: RFC 4034s section-6.1 // // See http://bert-hubert.blogspot.co.uk/2015/10/how-to-do-fast-canonical-ordering-of.html -// for a blog article on this implementation. +// for a blog article on this implementation, although here we still go label by label. // // The values of a and b are *not* lowercased before the comparison! func less(a, b string) int { @@ -24,6 +24,7 @@ func less(a, b string) int { if oka && okb { return 0 } + // sadly this []byte will allocate... TODO(miek): check if this is needed // for a name, otherwise compare the strings. ab := []byte(a[ai:aj]) |