]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dns_server: make use of tstream_bsd_fail_readv_first_error(true)
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jan 2023 09:40:13 +0000 (10:40 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 24 Oct 2023 09:36:37 +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/dns_server/dns_server.c

index ccb8babc4f4297e1d87388a7233223268be8e14e..dd9916770a50588ea73831897f3fe00d284b6843 100644 (file)
@@ -491,6 +491,8 @@ static void dns_tcp_accept(struct stream_connection *conn)
                                "dns_tcp_accept: out of memory");
                return;
        }
+       /* as server we want to fail early */
+       tstream_bsd_fail_readv_first_error(dns_conn->tstream, true);
 
        dns_conn->conn = conn;
        dns_conn->dns_socket = dns_socket;