mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
685b853763
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> |
||
---|---|---|
.. | ||
batching_conn.go | ||
blockforever_conn.go | ||
debughttp.go | ||
debugknobs_stubs.go | ||
debugknobs.go | ||
derp.go | ||
discopingpurpose_string.go | ||
endpoint_default.go | ||
endpoint_stub.go | ||
endpoint_tracker_test.go | ||
endpoint_tracker.go | ||
endpoint.go | ||
magicsock_default.go | ||
magicsock_linux.go | ||
magicsock_test.go | ||
magicsock_unix_test.go | ||
magicsock.go | ||
peermap.go | ||
peermtu_darwin.go | ||
peermtu_linux.go | ||
peermtu_stubs.go | ||
peermtu_unix.go | ||
peermtu.go | ||
rebinding_conn.go |