]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: add smbd_smb2_send_queue.sendfile_body_size
authorStefan Metzmacher <metze@samba.org>
Fri, 5 Jun 2020 18:14:10 +0000 (20:14 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Jul 2020 15:54:40 +0000 (15:54 +0000)
The following patches require the size of the full sendfile() pdu.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/smbd/globals.h
source3/smbd/smb2_read.c

index e749d5e954ec51594c50575e77ea81b81b412d5c..ec728b7dcf3958550f0324e41d812a9c6cabbbf5 100644 (file)
@@ -682,6 +682,7 @@ struct smbd_smb2_send_queue {
        struct smbd_smb2_send_queue *prev, *next;
 
        DATA_BLOB *sendfile_header;
+       uint32_t sendfile_body_size;
        NTSTATUS *sendfile_status;
        struct iovec *vector;
        int count;
index 3441ac27c0c33d50696407290ab73b1c3e229373..cd590a52c9515ce614e1d9bd9def57dcbeeeabc2 100644 (file)
@@ -651,6 +651,7 @@ static NTSTATUS smbd_smb2_read_recv(struct tevent_req *req,
                talloc_set_destructor(state, smb2_smb2_read_state_deny_destructor);
                tevent_req_received(req);
                state->smb2req->queue_entry.sendfile_header = &state->out_headers;
+               state->smb2req->queue_entry.sendfile_body_size = state->in_length;
                talloc_set_destructor(state, smb2_sendfile_send_data);
        } else {
                tevent_req_received(req);