summaryrefslogtreecommitdiffstats
path: root/device/receive.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-05-07 09:26:24 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-05-07 09:26:24 +0200
commit69b39db0b42275235975594448fc66d011d78ee9 (patch)
tree4112698f889d4b6c7b37701cce8a6a345e417ff0 /device/receive.go
parenttun: windows: rearrange struct to avoid alignment trap on 32bit (diff)
downloadwireguard-go-69b39db0b42275235975594448fc66d011d78ee9.tar.xz
wireguard-go-69b39db0b42275235975594448fc66d011d78ee9.zip
tun: windows: set event before waiting
In 097af6e ("tun: windows: protect reads from closing") we made sure no functions are running when End() is called, to avoid a UaF. But we still need to kick that event somehow, so that Read() is allowed to exit, in order to release the lock. So this commit calls SetEvent, while moving the closing boolean to be atomic so it can be modified without locks, and then moves to a WaitGroup for the RCU-like pattern. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions