diff options
author | Steve French <sfrench@us.ibm.com> | 2006-02-24 06:15:11 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-02-24 06:15:11 +0000 |
commit | 184ed2110ae6bfdb8dc91085149f04f2f4d2169e (patch) | |
tree | e36ae13694fb922cc2244ef6fffad7f93a6c90e0 /fs/cifs/connect.c | |
parent | 5d2f248a5f3acac4b763439327c92091be7abb1c (diff) | |
download | linux-stable-184ed2110ae6bfdb8dc91085149f04f2f4d2169e.tar.gz linux-stable-184ed2110ae6bfdb8dc91085149f04f2f4d2169e.tar.bz2 linux-stable-184ed2110ae6bfdb8dc91085149f04f2f4d2169e.zip |
[CIFS] Fix large (ie over 64K for MaxCIFSBufSize) buffer case for wrapping
bcc on read response and for wrapping sessionsetup maxbufsize field
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 16535b510a96..cf4bcf3a45e6 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -564,7 +564,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) dump_smb(smb_buffer, length); - if (checkSMB (smb_buffer, smb_buffer->Mid, total_read+4)) { + if (checkSMB(smb_buffer, smb_buffer->Mid, total_read+4)) { cifs_dump_mem("Bad SMB: ", smb_buffer, 48); continue; } @@ -2278,6 +2278,8 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, smb_buffer->Mid = GetNextMid(ses->server); pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; pSMB->req.AndXCommand = 0xFF; + if(ses->server->maxBuf > 64*1024) + ses->server->maxBuf = (64*1023); pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq); |