Age | Commit message (Collapse) | Author | Files | Lines |
|
The default dns.Response implementation of a dns.ResponseWriter will
panic if RemoteAddr() is called after the connection to the client has
been closed already. The current cache implementation doesn't create a
new request+responsewriter during an asynchronous prefetch, but
piggybacks on the request triggering the prefetch.
This change copies the RemoteAddr first, so that it's safe to use it
later during the actual prefetch request.
A better implementation would be to completely decouple the prefetch
request from the client triggering a request.
|
|
|
|
Reduce map usage and combine two maps into one; add isDuplicate that
tests and adds to make things more readable.
|
|
* - ensure description of 'append' match what is encoded.
* - fix description based on review comments
|
|
add a test to see if we copy the rcode correctly. Some minor cleanup in
import ordering and renaming NewUpstream to New as we already are in the
upstream package.
|
|
* - implement an auto-tunable dialTimeout for fallback.
* - fix gofmt
* - factorized timeout computation with readTimeout / updated readme /
* - fix comment
|
|
Fix typo corendns -> coredns in coredns.1
|
|
Bump the version, allows #691 to get merged.
|
|
* 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.
|
|
Add "Why is this needed".
I can get a description of what the PR does from the code changes,
answering the why question is more important.
|
|
* Current stage of the log files. Test need to be done as well as formatting of times.
* Finished testing. All altered classes test pass along with my additions
* Updated the replacer package to print the units as well. May take out.
* Changed the time units to be within the rules. Fixed the test as well.
* Fixed some tests, updated the readme, fixed the replacer class.
* Updates of standardizing only to seconds in response duration. Need to revert README.
* Reverted readme.
* Added a small test in new replacer.
* Changed replacer to inline the strconv for duration.
|
|
These must be alligned on 8 bytes, in Go this means putting them first
in the struct (AFAICT).
|
|
This fix update Makefile.release for docker image build
on different platforms.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
|
|
* Docker: drop alpine
Create a multistage docker build image that uses debian to install certs
and then create the final image by using FROM: scratch. This creates a
(slightly) smaller images and drops busybox and alpine.
* Even less copying
|
|
Uppercase these test cases as well.
|
|
Uppercase all these test errors as well. And extend the presubmit to
check for these in the future. Also do a slightly smarter grep to only
get t.<something>. as (because dump regexp) this also grep over non test
files.
|