]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:ntp_signd: make use of tstream_bsd_fail_readv_first_error(true)
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jan 2023 09:42:14 +0000 (10:42 +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/ntp_signd/ntp_signd.c

index eab70f1f148cd1a0be6bacd83535c305ee00b54a..4cf460fd2d92d7e99c45c1d69b9a3b5cf07ef688 100644 (file)
@@ -479,6 +479,8 @@ static void ntp_signd_accept(struct stream_connection *conn)
                                "ntp_signd_accept: out of memory");
                return;
        }
+       /* as server we want to fail early */
+       tstream_bsd_fail_readv_first_error(ntp_signd_conn->tstream, true);
 
        ntp_signd_conn->conn = conn;
        ntp_signd_conn->ntp_signd = ntp_signd;