tailscale/wgengine
Simon Law 825b7c479f
wgengine/magicsock: fix data race in TestNetworkSendErrors (#20261)
`TestNetworkSendErrors/network-down` causes a data race because it
tried to `tstest.Replace` the `checkNetworkDownDuringTests` global
while `wgengine.Conn.networkDown` would read from it. This patch moves
this flag into a field within the `wgengine.Conn` struct, so there’s
no chance that two tests could trample on each other.

It also renames this field to `Conn.checkNetworkUpDuringTests`,
because `Conn.networkUp` is the name of the field that gets checked.

Fixes #20260

Signed-off-by: Simon Law <sfllaw@tailscale.com>
2026-06-29 09:38:07 -07:00
..
bench wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00
filter net/tstun, wgengine/filter: track UDP flow state for injected packets 2026-06-22 15:57:37 -07:00
magicsock wgengine/magicsock: fix data race in TestNetworkSendErrors (#20261) 2026-06-29 09:38:07 -07:00
netlog wgengine/netlog: stop using netmap.NetworkMap type, use LocalBackend 2026-06-17 15:11:57 -07:00
netstack ipn/ipnlocal: consolidate test-only LocalBackend methods behind ForTest 2026-06-27 16:11:42 -07:00
router wgengine/router/osrouter,util/linuxfw: remove orphaned tailnet addrs (#20199) 2026-06-24 13:41:36 -07:00
wgcfg go.mod,wgengine/magicsock: pull wireguard-go fix for roaming endpoints (#20118) 2026-06-12 10:50:35 -07:00
wgint all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wglog wgengine/wglog: stop using netmap.NetworkMap here too 2026-06-23 09:06:37 -07:00
winnet all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
mem_ios.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen_omit.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen.go feature/conn25: recreate transit IP mappings when connector loses them 2026-06-17 13:50:51 -04:00
userspace_ext_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
userspace_test.go wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00
userspace.go wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00
wgengine.go wgengine: replace Engine.SetNetworkMap with SetSelfNode 2026-06-24 15:03:55 -07:00