mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-09 14:05:36 +09:00
wgengine/magicsock: validate endpoint.derpAddr in Conn.onUDPRelayAllocResp (#17828)
Otherwise a zero value will panic in Conn.sendUDPStd. Updates #17827 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
1 parent
4650061326
commit
18806de400
1 file changed
+3
-1
@@ -651,7 +651,9 @@ func (c *Conn) onUDPRelayAllocResp(allocResp UDPRelayAllocResp) {
|
||||
ep.mu.Lock()
|
||||
defer ep.mu.Unlock()
|
||||
derpAddr := ep.derpAddr
|
||||
go c.sendDiscoMessage(epAddr{ap: derpAddr}, ep.publicKey, disco.key, allocResp.Message, discoVerboseLog)
|
||||
if derpAddr.IsValid() {
|
||||
go c.sendDiscoMessage(epAddr{ap: derpAddr}, ep.publicKey, disco.key, allocResp.Message, discoVerboseLog)
|
||||
}
|
||||
}
|
||||
|
||||
// Synchronize waits for all [eventbus] events published
|
||||
|
||||
Reference in new issue
Block a user