summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2020-06-05 20:14:10 +0200
committerStefan Metzmacher <metze@samba.org>2020-07-08 15:54:40 +0000
commit37c52c2d49830940397a164864044dbd1f5d6c6a (patch)
tree36c506dae599fc43783295649114bb2b0bc94e2b
parent61b9418784f27b799338ea5aeab02b39bbd39ad1 (diff)
downloadsamba-37c52c2d49830940397a164864044dbd1f5d6c6a.tar.gz
s3:smbd: add smbd_smb2_send_queue.sendfile_body_size
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>
-rw-r--r--source3/smbd/globals.h1
-rw-r--r--source3/smbd/smb2_read.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index e749d5e954e..ec728b7dcf3 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -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;
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index 3441ac27c0c..cd590a52c95 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -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);