mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
wgengine/magicsock: fix panic regression from cryptokey routing change
Fixes #13332 Updates tailscale/corp#20732 Change-Id: I30f12746844bf77f5a664bf8e8d8ebf2511a2b27 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
2f2aeaeaeb
commit
65fe0ba7b5
@ -1089,7 +1089,13 @@ func (c *Conn) Send(buffs [][]byte, ep conn.Endpoint) error {
|
|||||||
metricSendDataNetworkDown.Add(n)
|
metricSendDataNetworkDown.Add(n)
|
||||||
return errNetworkDown
|
return errNetworkDown
|
||||||
}
|
}
|
||||||
return ep.(*endpoint).send(buffs)
|
if ep, ok := ep.(*endpoint); ok {
|
||||||
|
return ep.send(buffs)
|
||||||
|
}
|
||||||
|
// If it's not of type *endpoint, it's probably *lazyEndpoint, which means
|
||||||
|
// we don't actually know who the peer is and we're waiting for wireguard-go
|
||||||
|
// to switch the endpoint. See go/corp/20732.
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var errConnClosed = errors.New("Conn closed")
|
var errConnClosed = errors.New("Conn closed")
|
||||||
|
Loading…
Reference in New Issue
Block a user