The Samba-Bugzilla – Attachment 10677 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]
Test patch for master
tmp.diff.txt (text/plain), 1.91 KB, created by
Stefan Metzmacher
on 2015-01-28 15:00:54 UTC
(
hide
)
Description:
Test patch for master
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2015-01-28 15:00:54 UTC
Size:
1.91 KB
patch
obsolete
>From 7ce39c17d0d1ecbf8437fd6abf216cff24b16c8f Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 28 Jan 2015 15:22:30 +0100 >Subject: [PATCH] fix it? https://bugzilla.samba.org/show_bug.cgi?id=9702 > >--- > source3/smbd/smb2_server.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > >diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c >index 46bf6f9..3d1e8a9 100644 >--- a/source3/smbd/smb2_server.c >+++ b/source3/smbd/smb2_server.c >@@ -206,7 +206,7 @@ static NTSTATUS smbd_initialize_smb2(struct smbXsrv_connection *xconn) > xconn->smb2.credits.seq_low = 0; > xconn->smb2.credits.seq_range = 1; > xconn->smb2.credits.granted = 1; >- xconn->smb2.credits.max = lp_smb2_max_credits(); >+ xconn->smb2.credits.max = MIN(lp_smb2_max_credits(), INT16_MAX); > xconn->smb2.credits.bitmap = bitmap_talloc(xconn, > xconn->smb2.credits.max); > if (xconn->smb2.credits.bitmap == NULL) { >@@ -803,6 +803,7 @@ static void smb2_set_operation_credit(struct smbXsrv_connection *xconn, > > cmd = SVAL(inhdr, SMB2_HDR_OPCODE); > credits_requested = SVAL(inhdr, SMB2_HDR_CREDIT); >+ credits_requested = MAX(credits_requested, 1); > out_flags = IVAL(outhdr, SMB2_HDR_FLAGS); > out_status = NT_STATUS(IVAL(outhdr, SMB2_HDR_STATUS)); > >@@ -821,7 +822,7 @@ static void smb2_set_operation_credit(struct smbXsrv_connection *xconn, > * credits on the final response. > */ > credits_granted = 0; >- } else if (credits_requested > 0) { >+ } else { > uint16_t additional_max = 0; > uint16_t additional_credits = credits_requested - 1; > >@@ -850,11 +851,6 @@ static void smb2_set_operation_credit(struct smbXsrv_connection *xconn, > additional_credits = MIN(additional_credits, additional_max); > > credits_granted = credit_charge + additional_credits; >- } else if (xconn->smb2.credits.granted == 0) { >- /* >- * Make sure the client has always at least one credit >- */ >- credits_granted = 1; > } > > /* >-- >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