Remove the compound_related_in_progress state from the smb2 global state.
authorJeremy Allison <jra@samba.org>
Wed, 8 May 2013 22:10:32 +0000 (15:10 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 17 Jun 2013 07:20:07 +0000 (09:20 +0200)
And also remove the restriction that we can't read a new
request whilst we're in this state.

Signed-off-by: Jeremy Allison <jra@samba.org>
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
source3/smbd/smb2_server.c

index 730bb7e4ecb99e33eda31e48aceb89c03241a57d..ce5b18dbf9ca1b97628366739be752a218ee9f1e 100644 (file)
@@ -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;
 };
 
index f1f99663a55b731a44684b0a991de6434b285757..96159074d0aa3ccfafd1c051c2cebacd5af0c67c 100644 (file)
@@ -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