tailscale/wgengine/netstack
Simon Law e4e59a2af0
wgengine/netstack: stop inject goroutine from leaking in Impl.Start (#19721)
This patch fixes a data race in wgengine/netstack that surfaced while
running both TestTCPForwardLimits and TestTCPForwardLimits_PerClient.
Because these two tests both setup the TS_DEBUG_NETSTACK envknob, a
race happens because netstack.Impl.Close leaked its inject goroutine.
The inject goroutine also reads the TS_DEBUG_NETSTACK envknob, so if
it is still running when the next test starts, then it will break.

This patch also cleans up the tests a bit, ensuring that neither of
them run in T.Parallel. It also adds a T.Cleanup call to clear the
envknob.

Fixes #19720

Signed-off-by: Simon Law <sfllaw@tailscale.com>
2026-05-13 08:13:40 -07:00
..
gro all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
link_endpoint.go wgengine/netstack: deliver self-addressed packets via loopback 2026-02-27 14:30:41 -08:00
netstack_linux.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstack_tcpbuf_default.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstack_tcpbuf_ios.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstack_test.go wgengine/netstack: stop inject goroutine from leaking in Impl.Start (#19721) 2026-05-13 08:13:40 -07:00
netstack_userping_apple.go wgengine/netstack, net/ping: stop using pro-bing and use our net/ping instead 2026-05-04 14:05:24 -07:00
netstack_userping_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstack_userping.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstack.go wgengine/netstack: stop inject goroutine from leaking in Impl.Start (#19721) 2026-05-13 08:13:40 -07:00