]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:rpc_server: make use of tstream_bsd_fail_readv_first_error(true)
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jan 2023 09:48:22 +0000 (10:48 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 24 Oct 2023 09:36:38 +0000 (09:36 +0000)
This avoids doing useless work in case the client connection
is already broken.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/rpc_server/dcerpc_server.c

index 9614a1ab9b027bc52be31187c67cdb6407f4e9e8..e072cd20f95ae542febc076d99d040b54e34a799 100644 (file)
@@ -274,6 +274,8 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn)
                        return;
                }
                socket_set_flags(srv_conn->socket, SOCKET_FLAG_NOCLOSE);
+               /* as server we want to fail early */
+               tstream_bsd_fail_readv_first_error(dcesrv_conn->stream, true);
        }
 
        dcesrv_conn->local_address = srv_conn->local_address;