You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine/magicsock
Jordan Whited 685b853763
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>
12 months ago
..
batching_conn.go wgengine/magicsock: improve don't fragment bit set/get support 1 year ago
blockforever_conn.go wgengine/magicsock: improve don't fragment bit set/get support 1 year ago
debughttp.go wgengine/magicsock: stop retaining *netmap.NetworkMap 1 year ago
debugknobs.go wgengine/magicsock: replace CanPMTUD() with ShouldPMTUD() 1 year ago
debugknobs_stubs.go wgengine/magicsock: replace CanPMTUD() with ShouldPMTUD() 1 year ago
derp.go wgengine/magicsock: fix handling of derp.PeerGoneMessage (#10589) 12 months ago
discopingpurpose_string.go all: update copyright and license headers 2 years ago
endpoint.go wgengine/magicsock: move trustBestAddrUntil forward on non-disco rx (#10274) 1 year ago
endpoint_default.go all: adjust some build tags for plan9 1 year ago
endpoint_stub.go all: adjust some build tags for plan9 1 year ago
endpoint_tracker.go wgengine/magicsock: only cache N most recent endpoints per-Addr 1 year ago
endpoint_tracker_test.go wgengine/magicsock: only cache N most recent endpoints per-Addr 1 year ago
magicsock.go net/netcheck: use DERP frames as a signal for home region liveness 12 months ago
magicsock_default.go wgengine/magicsock: delete unused stuff 1 year ago
magicsock_linux.go wgengine/magicsock: simplify tryEnableUDPOffload() (#9872) 1 year ago
magicsock_test.go cmd/tailscaled,net/tstun: fix data race on start-up in TUN mode 1 year ago
magicsock_unix_test.go all: update copyright and license headers 2 years ago
peermap.go wgengine/magicsock: make peerMap also keyed by NodeID 1 year ago
peermtu.go disco,net/tstun,wgengine/magicsock: probe peer MTU 1 year ago
peermtu_darwin.go wgengine/magicsock: improve don't fragment bit set/get support 1 year ago
peermtu_linux.go wgengine/magicsock: improve don't fragment bit set/get support 1 year ago
peermtu_stubs.go wgengine/magicsock: replace CanPMTUD() with ShouldPMTUD() 1 year ago
peermtu_unix.go wgengine/magicsock: replace CanPMTUD() with ShouldPMTUD() 1 year ago
rebinding_conn.go wgengine/magicsock: improve don't fragment bit set/get support 1 year ago