mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-04 06:51:50 +02:00
Bugfix: Buffer was not set to the correct size for SMB2 Large MTU
This commit is contained in:
parent
9ca92eca83
commit
5ea442a71f
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ namespace SMBLibrary.Server.SMB2
|
|||
response.MaxReadSize = ServerMaxReadSizeLargeMTU;
|
||||
response.MaxWriteSize = ServerMaxWriteSizeLargeMTU;
|
||||
// [MS-SMB2] 3.3.5.2 Receiving Any Message - If the length of the message exceeds Connection.MaxTransactSize + 256, the server MUST disconnect the connection.
|
||||
int maxPacketSize = SessionPacket.HeaderLength + (int)ServerMaxTransactSize + 256;
|
||||
int maxPacketSize = SessionPacket.HeaderLength + (int)ServerMaxTransactSizeLargeMTU + 256;
|
||||
if (maxPacketSize > state.ReceiveBuffer.Buffer.Length)
|
||||
{
|
||||
state.ReceiveBuffer.IncreaseBufferSize(maxPacketSize);
|
||||
|
@ -100,7 +100,7 @@ namespace SMBLibrary.Server.SMB2
|
|||
response.MaxReadSize = ServerMaxReadSizeLargeMTU;
|
||||
response.MaxWriteSize = ServerMaxWriteSizeLargeMTU;
|
||||
// [MS-SMB2] 3.3.5.2 Receiving Any Message - If the length of the message exceeds Connection.MaxTransactSize + 256, the server MUST disconnect the connection.
|
||||
int maxPacketSize = SessionPacket.HeaderLength + (int)ServerMaxTransactSize + 256;
|
||||
int maxPacketSize = SessionPacket.HeaderLength + (int)ServerMaxTransactSizeLargeMTU + 256;
|
||||
if (maxPacketSize > state.ReceiveBuffer.Buffer.Length)
|
||||
{
|
||||
state.ReceiveBuffer.IncreaseBufferSize(maxPacketSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue