Skip to content

Commit fefedc7

Browse files
danielborosmiekgDan Boros
authored
Sync v1.1.68 (#11)
* Revert "Add ResponseWriter.Net function (miekg#1651)" (miekg#1665) This reverts commit 96a6b9c. (not backwards compatible) * Release 1.1.68 --------- Co-authored-by: Miek Gieben <[email protected]> Co-authored-by: Dan Boros <[email protected]>
1 parent 0b41fbe commit fefedc7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

server.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ type ResponseWriter interface {
4444
LocalAddr() net.Addr
4545
// RemoteAddr returns the net.Addr of the client that sent the current request.
4646
RemoteAddr() net.Addr
47-
// Network returns the value of the Net field of the Server (e.g., "tcp", "tcp-tls").
48-
Network() string
4947
// WriteMsg writes a reply back to the client.
5048
WriteMsg(*Msg) error
5149
// Write writes a raw buffer back to the client.
@@ -79,7 +77,6 @@ type response struct {
7977
udpSession *SessionUDP // oob data to get egress interface right
8078
pcSession net.Addr // address to use when writing to a generic net.PacketConn
8179
writer Writer // writer to output the raw DNS bits
82-
network string // corresponding Server.Net value
8380
}
8481

8582
// handleRefused returns a HandlerFunc that returns REFUSED for every request it gets.
@@ -635,7 +632,7 @@ func (srv *Server) serveUDP(l net.PacketConn) error {
635632

636633
// Serve a new TCP connection.
637634
func (srv *Server) serveTCPConn(wg *sync.WaitGroup, rw net.Conn) {
638-
w := &response{tsigProvider: srv.tsigProvider(), tcp: rw, network: srv.Net}
635+
w := &response{tsigProvider: srv.tsigProvider(), tcp: rw}
639636
if srv.DecorateWriter != nil {
640637
w.writer = srv.DecorateWriter(w)
641638
} else {
@@ -690,7 +687,7 @@ func (srv *Server) serveTCPConn(wg *sync.WaitGroup, rw net.Conn) {
690687

691688
// Serve a new UDP request.
692689
func (srv *Server) serveUDPPacket(wg *sync.WaitGroup, m []byte, u net.PacketConn, udpSession *SessionUDP, pcSession net.Addr) {
693-
w := &response{tsigProvider: srv.tsigProvider(), udp: u, udpSession: udpSession, pcSession: pcSession, network: srv.Net}
690+
w := &response{tsigProvider: srv.tsigProvider(), udp: u, udpSession: udpSession, pcSession: pcSession}
694691
if srv.DecorateWriter != nil {
695692
w.writer = srv.DecorateWriter(w)
696693
} else {
@@ -896,9 +893,6 @@ func (w *response) RemoteAddr() net.Addr {
896893
}
897894
}
898895

899-
// Network implements the ResponseWriter.Network method.
900-
func (w *response) Network() string { return w.network }
901-
902896
// TsigStatus implements the ResponseWriter.TsigStatus method.
903897
func (w *response) TsigStatus() error { return w.tsigStatus }
904898

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dns
33
import "fmt"
44

55
// Version is current version of this library.
6-
var Version = v{1, 1, 67}
6+
var Version = v{1, 1, 68}
77

88
// v holds the version of this library.
99
type v struct {

0 commit comments

Comments
 (0)