From 38fe05eb699550dc1ae5f6773f0190cad83d5ae8 Mon Sep 17 00:00:00 2001 From: Marek Majkowski Date: Wed, 22 Jan 2020 11:34:29 +0000 Subject: gonet PacketConn.RemoteAddr() incorrectly returns *net.TCPAddr, should be *net.UDPAddr PacketConn.LocalAddr() already returns *net.UDPAddr correctly. --- pkg/tcpip/adapters/gonet/gonet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/tcpip/adapters/gonet/gonet.go b/pkg/tcpip/adapters/gonet/gonet.go index a2f44b496..3bba4028b 100644 --- a/pkg/tcpip/adapters/gonet/gonet.go +++ b/pkg/tcpip/adapters/gonet/gonet.go @@ -622,7 +622,7 @@ func (c *PacketConn) RemoteAddr() net.Addr { if err != nil { return nil } - return fullToTCPAddr(a) + return fullToUDPAddr(a) } // Read implements net.Conn.Read -- cgit v1.2.3