summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-28 08:23:24 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-28 17:29:12 +0200
commit1f4bf0fb0fbcecd6de92047f6f68bf822af67a09 (patch)
treece28ad0ada668ee5a8a5f836dac1adc1ab0569b7 /source4
parentcaef1c7d2132fb9f669dd1e77c06172408386fc3 (diff)
downloadsamba-1f4bf0fb0fbcecd6de92047f6f68bf822af67a09.tar.gz
samba-1f4bf0fb0fbcecd6de92047f6f68bf822af67a09.tar.bz2
samba-1f4bf0fb0fbcecd6de92047f6f68bf822af67a09.zip
s4:libcli/smb2: ignore SMB2_OP_CANCEL responses
If there're a problem with signing or the session doesn't exists any more the server responses with a failure, instead of not sending a response. For now we ignore the reponse, as there's not much we could do with it and it's not likely that we generate bad requests, which trigger that behavior, except for testing. metze
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/smb2/transport.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c
index a1653e3974..c17bbfde46 100644
--- a/source4/libcli/smb2/transport.c
+++ b/source4/libcli/smb2/transport.c
@@ -277,6 +277,16 @@ static NTSTATUS smb2_transport_finish_recv(void *private_data, DATA_BLOB blob)
return smb2_handle_oplock_break(transport, &blob);
}
+ if (opcode == SMB2_OP_CANCEL) {
+ /*
+ * ignore responses to cancel requests,
+ * this can happen if signing was wrong or
+ * we specified the wrong session id
+ */
+ talloc_free(buffer);
+ return NT_STATUS_OK;
+ }
+
/* match the incoming request against the list of pending requests */
for (req=transport->pending_recv; req; req=req->next) {
if (req->seqnum == seqnum) break;