diff options
author | Marek Majkowski <marek@cloudflare.com> | 2020-01-22 11:34:29 +0000 |
---|---|---|
committer | Marek Majkowski <marek@cloudflare.com> | 2020-01-22 11:34:29 +0000 |
commit | 38fe05eb699550dc1ae5f6773f0190cad83d5ae8 (patch) | |
tree | f5b6e23de9c81bd223afce009615c4e44fe1225c /pkg/tcpip/adapters/gonet/gonet.go | |
parent | 6a59e7f510a7b12f8b3bd768dfe569033ef07d30 (diff) |
gonet PacketConn.RemoteAddr() incorrectly returns *net.TCPAddr, should be *net.UDPAddr
PacketConn.LocalAddr() already returns *net.UDPAddr correctly.
Diffstat (limited to 'pkg/tcpip/adapters/gonet/gonet.go')
-rw-r--r-- | pkg/tcpip/adapters/gonet/gonet.go | 2 |
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 |