Commit 829f692f authored by Stefan Metzmacher's avatar Stefan Metzmacher Committed by Jeremy Allison

smb2_server: grant all 8192 credits to clients

This seems to match Windows Server 2016.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863Signed-off-by: default avatarStefan Metzmacher <metze@samba.org>
Reviewed-by: default avatarRalph Boehme <slow@samba.org>
Reviewed-by: default avatarJeremy Allison <jra@samba.org>
parent 4d6cd932
......@@ -342,9 +342,6 @@
^samba.tests.dcerpc.dnsserver.python2.samba.tests.dcerpc.dnsserver.DnsserverTests.test_add_duplicate_different_type.*
^samba.tests.dcerpc.dnsserver.python2.samba.tests.dcerpc.dnsserver.DnsserverTests.test_rank_none.*
^samba.tests.dcerpc.dnsserver.python2.samba.tests.dcerpc.dnsserver.DnsserverTests.test_security_descriptor.*
^samba3.smb2.credits.session_setup_credits_granted.*
^samba3.smb2.credits.single_req_credits_granted.*
^samba3.smb2.credits.skipped_mid.*
^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dbcheck_dangling_multi_valued_clean
^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dangling_multi_valued_check_missing
#
......
......@@ -829,8 +829,11 @@ static void smb2_set_operation_credit(struct smbXsrv_connection *xconn,
* of requests and the used sequence number.
* Which means we would grant more credits
* for client which use multi credit requests.
*
* The above is what Windows Server < 2016 is doing,
* but new servers use all credits (8192 by default).
*/
current_max_credits = xconn->smb2.credits.max / 16;
current_max_credits = xconn->smb2.credits.max;
current_max_credits = MAX(current_max_credits, 1);
if (xconn->smb2.credits.multicredit) {
......@@ -875,15 +878,19 @@ static void smb2_set_operation_credit(struct smbXsrv_connection *xconn,
* with a successful session setup
*/
if (NT_STATUS_IS_OK(out_status)) {
additional_max = 32;
additional_max = xconn->smb2.credits.max;
}
break;
default:
/*
* We match windows and only grant additional credits
* in chunks of 32.
* Windows Server < 2016 and older Samba versions
* used to only grant additional credits in
* chunks of 32 credits.
*
* But we match Windows Server 2016 and grant
* all credits as requested.
*/
additional_max = 32;
additional_max = xconn->smb2.credits.max;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment