Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ type ResponseWriter interface {
LocalAddr() net.Addr
// RemoteAddr returns the net.Addr of the client that sent the current request.
RemoteAddr() net.Addr
// Network returns the value of the Net field of the Server (e.g., "tcp", "tcp-tls").
Network() string
// WriteMsg writes a reply back to the client.
WriteMsg(*Msg) error
// Write writes a raw buffer back to the client.
Expand Down Expand Up @@ -79,7 +77,6 @@ type response struct {
udpSession *SessionUDP // oob data to get egress interface right
pcSession net.Addr // address to use when writing to a generic net.PacketConn
writer Writer // writer to output the raw DNS bits
network string // corresponding Server.Net value
}

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

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

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

// Network implements the ResponseWriter.Network method.
func (w *response) Network() string { return w.network }

// TsigStatus implements the ResponseWriter.TsigStatus method.
func (w *response) TsigStatus() error { return w.tsigStatus }

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dns
import "fmt"

// Version is current version of this library.
var Version = v{1, 1, 67}
var Version = v{1, 1, 68}

// v holds the version of this library.
type v struct {
Expand Down