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
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>
6 months ago
..
bench tailcfg, all: use []netip.AddrPort instead of []string for Endpoints 8 months ago
capture various: add golangci-lint, fix issues (#7905) 1 year ago
filter wgengine/filter: add protocol-agnostic packet checker (#10446) 6 months ago
magicsock wgengine/magicsock: fix handling of derp.PeerGoneMessage (#10589) 6 months ago
netlog wgengine/netlog: fix nil pointer dereference in logtail (#8598) 11 months ago
netstack wgengine/netstack: disable RACK on Windows (#10402) 6 months ago
router wgengine/router: implement UpdateMagicsockPort for CallbackRouter (#10494) 6 months ago
wgcfg cmd/cloner,*: revert: optimize nillable slice cloner 8 months ago
wgint all: update copyright and license headers 1 year ago
wglog all: update copyright and license headers 1 year ago
winnet all: update copyright and license headers 1 year ago
mem_ios.go all: update copyright and license headers 1 year ago
pendopen.go types/netmap, all: use read-only tailcfg.NodeView in NetworkMap 10 months ago
userspace.go util/linuxfw, wgengine: allow ingress to magicsock UDP port on Linux (#10370) 6 months ago
userspace_ext_test.go tsd: add package with System type to unify subsystem init, discovery 1 year ago
userspace_test.go control,tailcfg,wgengine/magicsock: add nodeAttr to enable/disable peer MTU 8 months ago
watchdog.go wgengine, proxymap: split out port mapping from Engine to new type 9 months ago
watchdog_js.go all: update copyright and license headers 1 year ago
watchdog_test.go all: update copyright and license headers 1 year ago
wgengine.go wgengine, proxymap: split out port mapping from Engine to new type 9 months ago