mirror of
https://github.com/tailscale/tailscale.git
synced 2026-06-06 21:01:11 +08:00
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> |
||
|---|---|---|
| .. | ||
| gro | ||
| link_endpoint.go | ||
| netstack_linux.go | ||
| netstack_tcpbuf_default.go | ||
| netstack_tcpbuf_ios.go | ||
| netstack_test.go | ||
| netstack_userping_apple.go | ||
| netstack_userping_test.go | ||
| netstack_userping.go | ||
| netstack.go | ||