mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +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> |
||
---|---|---|
.. | ||
bench | ||
capture | ||
filter | ||
magicsock | ||
netlog | ||
netstack | ||
router | ||
wgcfg | ||
wgint | ||
wglog | ||
winnet | ||
mem_ios.go | ||
pendopen.go | ||
userspace_ext_test.go | ||
userspace_test.go | ||
userspace.go | ||
watchdog_js.go | ||
watchdog_test.go | ||
watchdog.go | ||
wgengine.go |