]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
conn: linux: protect read fds
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 20 May 2021 16:09:55 +0000 (18:09 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 20 May 2021 16:09:55 +0000 (18:09 +0200)
commitbd83f0ac993bc5bee0b0f96c74d24cab142ba385
tree07e339d5d06b4e688ad3d0256ecf49b944a9e76e
parent50d779833e4457f5a2bed788d4048939db8e9fe7
conn: linux: protect read fds

The -1 protection was removed and the wrong error was returned, causing
us to read from a bogus fd. As well, remove the useless closures that
aren't doing anything, since this is all synchronized anyway.

Fixes: 10533c3 ("all: make conn.Bind.Open return a slice of receive functions")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
conn/bind_linux.go