s4:smb_server/smb2: don't reset highest_smb2_seqnum on SMB2 Cancel
authorStefan Metzmacher <metze@samba.org>
Thu, 26 Nov 2009 13:18:50 +0000 (14:18 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 27 Nov 2009 07:19:46 +0000 (08:19 +0100)
metze

source4/smb_server/smb2/receive.c

index d26be41e6f7f854045100002743512715b971428..26995b71ec4cd602e81bcf21c6607cc36a36bf3f 100644 (file)
@@ -328,8 +328,10 @@ static NTSTATUS smb2srv_reply(struct smb2srv_request *req)
                smbsrv_terminate_connection(req->smb_conn, "Invalid SMB2 sequence number");
                return NT_STATUS_INVALID_PARAMETER;
        }
                smbsrv_terminate_connection(req->smb_conn, "Invalid SMB2 sequence number");
                return NT_STATUS_INVALID_PARAMETER;
        }
-       req->smb_conn->highest_smb2_seqnum = req->seqnum;
-       
+       if (opcode != SMB2_OP_CANCEL) {
+               req->smb_conn->highest_smb2_seqnum = req->seqnum;
+       }
+
        req->session    = smbsrv_session_find(req->smb_conn, uid, req->request_time);
        req->tcon       = smbsrv_smb2_tcon_find(req->session, tid, req->request_time);
 
        req->session    = smbsrv_session_find(req->smb_conn, uid, req->request_time);
        req->tcon       = smbsrv_smb2_tcon_find(req->session, tid, req->request_time);