@@ -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.
637634func (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.
692689func (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.
903897func (w * response ) TsigStatus () error { return w .tsigStatus }
904898
0 commit comments