* plugin/file: fix local CNAME lookup
Issue #1864 explains it will, when we serve the child zone as well we
should just recursive into ourself (upstream self). Thus relax the
IsSubDomain check in file/lookup.go and just query (even if the query
will hit a remote server).
I've looped over all other plugins that do something similar (CNAME
resolving) and they didn't do the IsSubDomain check; therefor I've
removed it from *file* as well.
Added test in file_upstream_test that shows this failed before but now
results in a reply.
Fixes#1864
* self does not need to be exported
* Fix test
We don't know if we had a valid reply. Check this.
Remove the code and remove the call in etcd and kubernetes handlers.
This does mean we should not add dups in the first place, which means
adding maps in backend_lookup to prevent dups from begin added.
This should cut down on the allocations because dnsutil.Dedup is very
expensive by converting everything to strings, we avoid doing that now.
* Remove Compress by default
Set Compress = true in Scrub only when the message doesn not fit the
advertized buffer. Doing compression is expensive, so try to avoid it.
Master vs this branch
pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-2 50000 24774 ns/op
pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-2 100000 21960 ns/op
* and make it compile
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Create separate function for zone check
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Add tests for zone A records
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Remove pointer from checkZoneForRecord func signature, Add documentation
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Change apex to zone, Update readme information, Add additional tests
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Change zone to apex
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Change readme to reflect apex change
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Correct code comment
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Correct string join for apex.dns
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Add a dynamic SOA record (at least the serial and minttl). This create
another interface that should be implemented by the backends.
For now default to returning epoch in as a uint32 (no change from
before).
Lower the minTTL returned to 30s (from 60s)
* 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/backend_lookup.go (Browse further)