@@ -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.
@@ -560,7 +557,7 @@ func (srv *Server) serveUDP(l net.PacketConn) error {
560557
561558// Serve a new TCP connection.
562559func (srv * Server ) serveTCPConn (wg * sync.WaitGroup , rw net.Conn ) {
563- w := & response {tsigProvider : srv .tsigProvider (), tcp : rw , network : srv . Net }
560+ w := & response {tsigProvider : srv .tsigProvider (), tcp : rw }
564561 if srv .DecorateWriter != nil {
565562 w .writer = srv .DecorateWriter (w )
566563 } else {
@@ -615,7 +612,7 @@ func (srv *Server) serveTCPConn(wg *sync.WaitGroup, rw net.Conn) {
615612
616613// Serve a new UDP request.
617614func (srv * Server ) serveUDPPacket (wg * sync.WaitGroup , m []byte , u net.PacketConn , udpSession * SessionUDP , pcSession net.Addr ) {
618- w := & response {tsigProvider : srv .tsigProvider (), udp : u , udpSession : udpSession , pcSession : pcSession , network : srv . Net }
615+ w := & response {tsigProvider : srv .tsigProvider (), udp : u , udpSession : udpSession , pcSession : pcSession }
619616 if srv .DecorateWriter != nil {
620617 w .writer = srv .DecorateWriter (w )
621618 } else {
@@ -821,9 +818,6 @@ func (w *response) RemoteAddr() net.Addr {
821818 }
822819}
823820
824- // Network implements the ResponseWriter.Network method.
825- func (w * response ) Network () string { return w .network }
826-
827821// TsigStatus implements the ResponseWriter.TsigStatus method.
828822func (w * response ) TsigStatus () error { return w .tsigStatus }
829823
0 commit comments