From ef94e7c2a58cfa5d54212e99186e5dbc5fe39ddb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 8 May 2013 15:10:32 -0700 Subject: [PATCH] Remove the compound_related_in_progress state from the smb2 global state. And also remove the restriction that we can't read a new request whilst we're in this state. Signed-off-by: Jeremy Allison The last 4 patches address bug #9722 - Samba does not properly handle Oplock breaks in compound requests. (cherry picked from commit 9094b538c85a550b40827799f56427a926d315cd) --- source3/smbd/globals.h | 1 - source3/smbd/smb2_server.c | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 730bb7e4ecb..ce5b18dbf9c 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -647,7 +647,6 @@ struct smbd_server_connection { uint32_t max_trans; uint32_t max_read; uint32_t max_write; - bool compound_related_in_progress; } smb2; }; diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index f1f99663a55..96159074d0a 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -1012,7 +1012,6 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req, * This is no longer a compound request. */ req->compound_related = false; - req->sconn->smb2.compound_related_in_progress = false; flags = (IVAL(outhdr, SMB2_HDR_FLAGS) & ~SMB2_HDR_FLAG_CHAINED); SIVAL(outhdr, SMB2_HDR_FLAGS, flags); } @@ -1354,7 +1353,6 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req) if (flags & SMB2_HDR_FLAG_CHAINED) { req->compound_related = true; - req->sconn->smb2.compound_related_in_progress = true; } switch (opcode) { @@ -1824,7 +1822,6 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req) if (req->compound_related) { req->compound_related = false; - req->sconn->smb2.compound_related_in_progress = false; } smb2_setup_nbt_length(req->out.vector, req->out.vector_count); @@ -2541,14 +2538,6 @@ static NTSTATUS smbd_smb2_request_next_incoming(struct smbd_server_connection *s size_t cur_send_queue_len; struct tevent_req *subreq; - if (sconn->smb2.compound_related_in_progress) { - /* - * Can't read another until the related - * compound is done. - */ - return NT_STATUS_OK; - } - if (tevent_queue_length(sconn->smb2.recv_queue) > 0) { /* * if there is already a smbd_smb2_request_read -- 2.11.4.GIT