summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs
diff options
context:
space:
mode:
authorJordan Whited <jordan@tailscale.com>2023-12-14 12:54:19 -0800
committerGitHub <noreply@github.com>2023-12-14 12:54:19 -0800
commit685b853763b6ed00ab1ef103251e62c739815525 (patch)
tree9c2da8bf8492edd7f4873c58e8ce07c4ba86c6ce /control/controlknobs
parent3ae562366b23fa59d2331a7455f1ceca279ab3a1 (diff)
downloadtailscale-685b853763b6ed00ab1ef103251e62c739815525.tar.xz
tailscale-685b853763b6ed00ab1ef103251e62c739815525.zip
wgengine/magicsock: fix handling of derp.PeerGoneMessage (#10589)
The switch in Conn.runDerpReader() on the derp.ReceivedMessage type contained cases other than derp.ReceivedPacket that fell through to writing to c.derpRecvCh, which should only be reached for derp.ReceivedPacket. This can result in the last/previous derp.ReceivedPacket to be re-handled, effectively creating a duplicate packet. If the last derp.ReceivedPacket happens to be a disco.CallMeMaybe it may result in a disco ping scan towards the originating peer on the endpoints contained. The change in this commit moves the channel write on c.derpRecvCh and subsequent select awaiting the result into the derp.ReceivedMessage case, preventing it from being reached from any other case. Explicit continue statements are also added to non-derp.ReceivedPacket cases where they were missing, in order to signal intent to the reader. Fixes #10586 Signed-off-by: Jordan Whited <jordan@tailscale.com>
Diffstat (limited to 'control/controlknobs')
0 files changed, 0 insertions, 0 deletions