diff options
author | Steve French <sfrench@us.ibm.com> | 2005-08-17 15:38:22 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-08-17 15:38:22 -0400 |
commit | 1982c344f1bf08118f7c224958b30c64e162009e (patch) | |
tree | b5268e345010421ca2625b29efc981c187c4df2e /fs/cifs/connect.c | |
parent | a59c658607b63ec7b6c2536597a075ee307b1b4c (diff) |
[CIFS] Ensure that cifs multiplex ids do not collide.
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 36f78596c81a..9e8256003f73 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1857,6 +1857,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
1857 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, | 1857 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, |
1858 | NULL /* no tCon exists yet */ , 13 /* wct */ ); | 1858 | NULL /* no tCon exists yet */ , 13 /* wct */ ); |
1859 | 1859 | ||
1860 | smb_buffer->Mid = GetNextMid(ses->server); | ||
1860 | pSMB->req_no_secext.AndXCommand = 0xFF; | 1861 | pSMB->req_no_secext.AndXCommand = 0xFF; |
1861 | pSMB->req_no_secext.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); | 1862 | pSMB->req_no_secext.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); |
1862 | pSMB->req_no_secext.MaxMpxCount = cpu_to_le16(ses->server->maxReq); | 1863 | pSMB->req_no_secext.MaxMpxCount = cpu_to_le16(ses->server->maxReq); |
@@ -2132,6 +2133,8 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2132 | /* send SMBsessionSetup here */ | 2133 | /* send SMBsessionSetup here */ |
2133 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, | 2134 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, |
2134 | NULL /* no tCon exists yet */ , 12 /* wct */ ); | 2135 | NULL /* no tCon exists yet */ , 12 /* wct */ ); |
2136 | |||
2137 | smb_buffer->Mid = GetNextMid(ses->server); | ||
2135 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; | 2138 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; |
2136 | pSMB->req.AndXCommand = 0xFF; | 2139 | pSMB->req.AndXCommand = 0xFF; |
2137 | pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); | 2140 | pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); |
@@ -2398,6 +2401,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2398 | /* send SMBsessionSetup here */ | 2401 | /* send SMBsessionSetup here */ |
2399 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, | 2402 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, |
2400 | NULL /* no tCon exists yet */ , 12 /* wct */ ); | 2403 | NULL /* no tCon exists yet */ , 12 /* wct */ ); |
2404 | |||
2405 | smb_buffer->Mid = GetNextMid(ses->server); | ||
2401 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; | 2406 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; |
2402 | pSMB->req.hdr.Flags |= (SMBFLG_CASELESS | SMBFLG_CANONICAL_PATH_FORMAT); | 2407 | pSMB->req.hdr.Flags |= (SMBFLG_CASELESS | SMBFLG_CANONICAL_PATH_FORMAT); |
2403 | 2408 | ||
@@ -2740,6 +2745,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2740 | /* send SMBsessionSetup here */ | 2745 | /* send SMBsessionSetup here */ |
2741 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, | 2746 | header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX, |
2742 | NULL /* no tCon exists yet */ , 12 /* wct */ ); | 2747 | NULL /* no tCon exists yet */ , 12 /* wct */ ); |
2748 | |||
2749 | smb_buffer->Mid = GetNextMid(ses->server); | ||
2743 | pSMB->req.hdr.Flags |= (SMBFLG_CASELESS | SMBFLG_CANONICAL_PATH_FORMAT); | 2750 | pSMB->req.hdr.Flags |= (SMBFLG_CASELESS | SMBFLG_CANONICAL_PATH_FORMAT); |
2744 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; | 2751 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; |
2745 | pSMB->req.AndXCommand = 0xFF; | 2752 | pSMB->req.AndXCommand = 0xFF; |
@@ -3111,6 +3118,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
3111 | 3118 | ||
3112 | header_assemble(smb_buffer, SMB_COM_TREE_CONNECT_ANDX, | 3119 | header_assemble(smb_buffer, SMB_COM_TREE_CONNECT_ANDX, |
3113 | NULL /*no tid */ , 4 /*wct */ ); | 3120 | NULL /*no tid */ , 4 /*wct */ ); |
3121 | |||
3122 | smb_buffer->Mid = GetNextMid(ses->server); | ||
3114 | smb_buffer->Uid = ses->Suid; | 3123 | smb_buffer->Uid = ses->Suid; |
3115 | pSMB = (TCONX_REQ *) smb_buffer; | 3124 | pSMB = (TCONX_REQ *) smb_buffer; |
3116 | pSMBr = (TCONX_RSP *) smb_buffer_response; | 3125 | pSMBr = (TCONX_RSP *) smb_buffer_response; |