The Samba-Bugzilla – Attachment 10680 Details for
Bug 9702
Current crediting algorithm causes problems due to a Win7 client bug.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
possible reproducer patches for smbclient -mSMB2_02 -c 'get largefile.dat /dev/null'
reproduce-hacks-01.diff.txt (text/plain), 2.78 KB, created by
Stefan Metzmacher
on 2015-01-28 15:31:01 UTC
(
hide
)
Description:
possible reproducer patches for smbclient -mSMB2_02 -c 'get largefile.dat /dev/null'
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2015-01-28 15:31:01 UTC
Size:
2.78 KB
patch
obsolete
>From 2b771f576109f930e23ec4e3487b9b4901c88e91 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 28 Jan 2015 15:13:26 +0100 >Subject: [PATCH 1/3] debug credits client... > >--- > libcli/smb/smbXcli_base.c | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c >index 8aa6020..1d70aab 100644 >--- a/libcli/smb/smbXcli_base.c >+++ b/libcli/smb/smbXcli_base.c >@@ -2948,6 +2948,9 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, > SSVAL(state->smb2.hdr, SMB2_HDR_CREDIT, credits); > SBVAL(state->smb2.hdr, SMB2_HDR_MESSAGE_ID, mid); > >+ DEBUG(0,("opcode[%u] mid[%llu] requests credits[%u] \n", >+ opcode, (unsigned long long)mid, credits)); >+ > skip_credits: > if (state->session && encryption_key == NULL) { > /* >@@ -3375,6 +3378,9 @@ static NTSTATUS smb2cli_conn_dispatch_incoming(struct smbXcli_conn *conn, > const DATA_BLOB *signing_key = NULL; > bool was_encrypted = false; > >+ DEBUG(0,("mid[%llu] got credits[%u] \n", >+ (unsigned long long)mid, credits)); >+ > new_credits = conn->smb2.cur_credits; > new_credits += credits; > if (new_credits > UINT16_MAX) { >-- >1.9.1 > > >From 0f96299a82e20e2cc54e4a2b269b253832558ade Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 28 Jan 2015 15:52:31 +0100 >Subject: [PATCH 2/3] reproduce try 1 => windows grants 1 credit with credits > requests == 0 > >--- > libcli/smb/smbXcli_base.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c >index 1d70aab..1f1748b 100644 >--- a/libcli/smb/smbXcli_base.c >+++ b/libcli/smb/smbXcli_base.c >@@ -2938,6 +2938,10 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, > credits += 1; > } > >+ if (opcode == SMB2_OP_TCON) { >+ credits = 0; >+ } >+ > mid = state->conn->smb2.mid; > state->conn->smb2.mid += charge; > state->conn->smb2.cur_credits -= charge; >-- >1.9.1 > > >From b8747ef39c1f529456a6a2348e6dd0cb2e5528ae Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 28 Jan 2015 15:42:38 +0100 >Subject: [PATCH 3/3] reproduce try 2 => todo ? > >--- > libcli/smb/smbXcli_base.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c >index 1f1748b..992ac16 100644 >--- a/libcli/smb/smbXcli_base.c >+++ b/libcli/smb/smbXcli_base.c >@@ -2935,12 +2935,12 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, > state->conn->smb2.cur_credits; > } > if (state->conn->smb2.max_credits >= state->conn->smb2.cur_credits) { >- credits += 1; >+ //credits += 1; > } > >- if (opcode == SMB2_OP_TCON) { >- credits = 0; >- } >+ //if (opcode == SMB2_OP_TCON) { >+ // credits = 0; >+ //} > > mid = state->conn->smb2.mid; > state->conn->smb2.mid += charge; >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9702
:
8617
|
8984
|
10677
|
10680
|
10691
|
10692
|
10693
|
10694
|
10695
|
10697
|
10698