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
Andrew Dunham 7429e8912a wgengine/netstack: fix bug with duplicate SYN packets in client limit
This fixes a bug that was introduced in #11258 where the handling of the
per-client limit didn't properly account for the fact that the gVisor
TCP forwarder will return 'true' to indicate that it's handled a
duplicate SYN packet, but not launch the handler goroutine.

In such a case, we neither decremented our per-client limit in the
wrapper function, nor did we do so in the handler function, leading to
our per-client limit table slowly filling up without bound.

Fix this by doing the same duplicate-tracking logic that the TCP
forwarder does so we can detect such cases and appropriately decrement
our in-flight counter.

Updates tailscale/corp#12184

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: Ib6011a71d382a10d68c0802593f34b8153d06892
2 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: don't change DERP home when not connected to control 2 months ago
netlog wgengine/netlog: fix nil pointer dereference in logtail (#8598) 10 months ago
netstack wgengine/netstack: fix bug with duplicate SYN packets in client limit 2 months ago
router wgengine/router: fix ip rule restoration 3 months ago
wgcfg all: remove LenIter, use Go 1.22 range-over-int instead 3 months ago
wgint wgengine{,/wgint}: add wgint.Peer wrapper type, add to wgengine.Engine 3 months ago
wglog wgengine/wglog: add TS_DEBUG_RAW_WGLOG envknob for raw wg logs 3 months 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 wgengine: make pendOpen time later, after dup check 3 months ago
userspace.go wgengine: plumb the PeerByKey from wgengine to magicsock 3 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{,/wgint}: add wgint.Peer wrapper type, add to wgengine.Engine 3 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{,/wgint}: add wgint.Peer wrapper type, add to wgengine.Engine 3 months ago