]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commit
slirp: check TCP connect completion with SO_ERROR
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Thu, 28 May 2026 00:38:28 +0000 (17:38 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Tue, 2 Jun 2026 22:33:30 +0000 (15:33 -0700)
commit01a6350106d57b4b39be791db811b958c415c0fe
tree4dc07fcdb4242d026d8bfcfd464dd891de46b0f6
parent5887c0c21c9ade2e9c5fe755511d80fef8d4ccd1
slirp: check TCP connect completion with SO_ERROR

The nonblocking connect path treated a writable socket as connected
and then used a zero-length send as the failure probe. That is not a
reliable completion check and can mis-handle failed or pending guest
TCP connects.

Use getsockopt(SO_ERROR) when select reports the socket writable. Keep
pending connects pending, and only clear SS_ISFCONNECTING after the
host socket has no pending error.
slirp/slirp.cpp