aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-05-23 13:50:27 +0100
committerGravatar Chris O'Haver <cohaver@infoblox.com> 2018-05-23 08:50:27 -0400
commit0f74281a533a86b7b5ccaa0173d440d80d709308 (patch)
tree2d110f60e588614ebe77af1c6e5be2faf06f2990 /plugin
parent49891d21037fbcf699d9376a39c23762fdb16899 (diff)
downloadcoredns-0f74281a533a86b7b5ccaa0173d440d80d709308.tar.gz
coredns-0f74281a533a86b7b5ccaa0173d440d80d709308.tar.zst
coredns-0f74281a533a86b7b5ccaa0173d440d80d709308.zip
Revert pkg/nonwriter changes (#1829)
The DoH work (#1619) made changes to pkg/nonwriter.Writer that in hindsight were not backwards compatible; it added override for the LocalAddr() and RemoteAddr(). Instead of rolling back that PR, this PR reverts those changes and creates a DoHWriter for use in the https-server.go side of things. This was only caught in the integration test making this hard to catch, so we add a upstream_file_test.go that tries (doesn't work yet) to test this in the unit tests as well. Esp. helpful when 'git bisecting'. Fixes #1826
Diffstat (limited to 'plugin')
-rw-r--r--plugin/pkg/nonwriter/nonwriter.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/plugin/pkg/nonwriter/nonwriter.go b/plugin/pkg/nonwriter/nonwriter.go
index b157e4242..411e98a94 100644
--- a/plugin/pkg/nonwriter/nonwriter.go
+++ b/plugin/pkg/nonwriter/nonwriter.go
@@ -2,8 +2,6 @@
package nonwriter
import (
- "net"
-
"github.com/miekg/dns"
)
@@ -11,11 +9,6 @@ import (
type Writer struct {
dns.ResponseWriter
Msg *dns.Msg
-
- // Raddr is the remote's address. This can be optionally set.
- Raddr net.Addr
- // Laddr is our address. This can be optionally set.
- Laddr net.Addr
}
// New makes and returns a new NonWriter.
@@ -26,9 +19,3 @@ func (w *Writer) WriteMsg(res *dns.Msg) error {
w.Msg = res
return nil
}
-
-// RemoteAddr returns the remote address.
-func (w *Writer) RemoteAddr() net.Addr { return w.Raddr }
-
-// LocalAddr returns the local address.
-func (w *Writer) LocalAddr() net.Addr { return w.Laddr }