mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 14:43:19 +00:00
cmd/natc: fix nil pointer
Fixes #13495 Signed-off-by: Fran Bull <fran@tailscale.com>
This commit is contained in:
@@ -456,6 +456,11 @@ func (c *connector) ignoreDestination(dstAddrs []netip.Addr) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func proxyTCPConn(c net.Conn, dest string) {
|
func proxyTCPConn(c net.Conn, dest string) {
|
||||||
|
if c.RemoteAddr() == nil {
|
||||||
|
log.Printf("proxyTCPConn: nil RemoteAddr")
|
||||||
|
c.Close()
|
||||||
|
return
|
||||||
|
}
|
||||||
addrPortStr := c.LocalAddr().String()
|
addrPortStr := c.LocalAddr().String()
|
||||||
_, port, err := net.SplitHostPort(addrPortStr)
|
_, port, err := net.SplitHostPort(addrPortStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user