wireguard-go/tun
Jason A. Donenfeld 69b39db0b4 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>
2021-05-07 09:26:24 +02:00
..
netstack tun/netstack: update go mod and remove GSO argument 2021-05-06 11:07:26 +02:00
tuntest global: remove TODO name graffiti 2021-02-23 20:00:57 +01:00
wintun memmod: use resource functions from x/sys 2021-03-08 21:04:09 -07:00
alignment_windows_test.go tun: windows: check alignment in unit test 2021-05-07 09:15:50 +02:00
operateonfd.go global: bump copyright 2021-01-28 17:52:15 +01:00
tun.go global: bump copyright 2021-01-28 17:52:15 +01:00
tun_darwin.go tun: make NativeTun.Close well behaved, not crash on double close 2021-02-22 15:26:29 +01:00
tun_freebsd.go tun: freebsd: avoid OOB writes 2021-04-19 15:10:23 -06:00
tun_linux.go tun: linux: do not spam events every second from hack listener 2021-03-11 09:23:11 -07:00
tun_openbsd.go tun: make NativeTun.Close well behaved, not crash on double close 2021-02-22 15:26:29 +01:00
tun_windows.go tun: windows: set event before waiting 2021-05-07 09:26:24 +02:00