Module: wine Branch: master Commit: c5487167df0fb0e444d82d2ac229369991b12ebe URL: https://source.winehq.org/git/wine.git/?a=commit;h=c5487167df0fb0e444d82d2ac... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Jun 22 10:24:13 2021 -0500 ws2_32: Explicitly forbid setting SO_ACCEPTCONN. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 71537e6a2d8..a0f704eba20 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3617,7 +3617,6 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, /* The options listed here don't need any special handling. Thanks to * the conversion happening above, options from there will fall through * to this, too.*/ - case WS_SO_ACCEPTCONN: case WS_SO_BROADCAST: case WS_SO_ERROR: case WS_SO_KEEPALIVE: @@ -3714,6 +3713,9 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, default: TRACE("Unknown SOL_SOCKET optname: 0x%08x\n", optname); + /* fall through */ + + case WS_SO_ACCEPTCONN: SetLastError(WSAENOPROTOOPT); return SOCKET_ERROR; }