![]() endpoint.discoKey is protected by endpoint.mu. endpoint.sendDiscoMessage was reading it without holding the lock. This showed up in a CI failure and is readily reproducible locally. The fix is in two parts. First, for Conn.enqueueCallMeMaybe, eliminate the one-line helper method endpoint.sendDiscoMessage; call Conn.sendDiscoMessage directly. This makes it more natural to read endpoint.discoKey in a context in which endpoint.mu is already held. Second, for endpoint.sendDiscoPing, explicitly pass the disco key as an argument. Again, this makes it easier to read endpoint.discoKey in a context in which endpoint.mu is already held. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com> |
||
---|---|---|
.. | ||
bench | ||
filter | ||
magicsock | ||
monitor | ||
netstack | ||
router | ||
wgcfg | ||
wglog | ||
winnet | ||
mem_ios.go | ||
pendopen.go | ||
userspace.go | ||
userspace_ext_test.go | ||
userspace_test.go | ||
watchdog.go | ||
watchdog_test.go | ||
wgengine.go |