aboutsummaryrefslogtreecommitdiffstats
path: root/device/allowedips_rand_test.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-11-16 21:13:55 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-11-16 21:16:04 +0100
commitde7c702ace45b8eeba7f4de8ecd9c85c80806264 (patch)
treebb6679e45f0463a4db86f69f2b5c27ad2dcc44a2 /device/allowedips_rand_test.go
parentdevice: align 64-bit atomic member in Device (diff)
downloadwireguard-go-de7c702ace45b8eeba7f4de8ecd9c85c80806264.tar.xz
wireguard-go-de7c702ace45b8eeba7f4de8ecd9c85c80806264.zip
device: only propagate roaming value before peer is referenced elsewhere
A peer.endpoint never becomes nil after being not-nil, so creation is the only time we actually need to set this. This prevents a race from when the variable is actually used elsewhere, and allows us to avoid an expensive atomic. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/allowedips_rand_test.go')
0 files changed, 0 insertions, 0 deletions