mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-05 09:21:36 +01:00
wgengine: fix TSMP/ICMP callback leak
Fixes #18112 Change-Id: I85d5c482b01673799d51faeb6cb0579903597502 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
536188c1b5
commit
b8c58ca7c1
@ -451,6 +451,7 @@ func NewUserspaceEngine(logf logger.Logf, conf Config) (_ Engine, reterr error)
|
||||
cb := e.pongCallback[pong.Data]
|
||||
e.logf("wgengine: got TSMP pong %02x, peerAPIPort=%v; cb=%v", pong.Data, pong.PeerAPIPort, cb != nil)
|
||||
if cb != nil {
|
||||
delete(e.pongCallback, pong.Data)
|
||||
go cb(pong)
|
||||
}
|
||||
}
|
||||
@ -464,6 +465,7 @@ func NewUserspaceEngine(logf logger.Logf, conf Config) (_ Engine, reterr error)
|
||||
// We didn't swallow it, so let it flow to the host.
|
||||
return false
|
||||
}
|
||||
delete(e.icmpEchoResponseCallback, idSeq)
|
||||
e.logf("wgengine: got diagnostic ICMP response %02x", idSeq)
|
||||
go cb()
|
||||
return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user