summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorMarek Majkowski <marek@cloudflare.com>2020-01-22 11:34:29 +0000
committerMarek Majkowski <marek@cloudflare.com>2020-01-22 11:34:29 +0000
commit38fe05eb699550dc1ae5f6773f0190cad83d5ae8 (patch)
treef5b6e23de9c81bd223afce009615c4e44fe1225c /pkg
parent6a59e7f510a7b12f8b3bd768dfe569033ef07d30 (diff)
gonet PacketConn.RemoteAddr() incorrectly returns *net.TCPAddr, should be *net.UDPAddr
PacketConn.LocalAddr() already returns *net.UDPAddr correctly.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/tcpip/adapters/gonet/gonet.go2
1 files changed, 1 insertions, 1 deletions
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