Skip to content

Commit cbd4cba

Browse files
committed
do not reuse connection if share marked as isolated
"SHAREFLAG_ISOLATED_TRANSPORT" indicates that we should not reuse the socket for this share (for future mounts). Mark the socket as server->nosharesock if share flags returned include SHAREFLAG_ISOLATED_TRANSPORT. See MS-SMB2 MS-SMB2 2.2.10 and 3.2.5.5 Signed-off-by: Steve French <[email protected]>
1 parent d66cde5 commit cbd4cba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/cifs/smb2pdu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,9 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
19471947
init_copy_chunk_defaults(tcon);
19481948
if (server->ops->validate_negotiate)
19491949
rc = server->ops->validate_negotiate(xid, tcon);
1950+
if (rc == 0) /* See MS-SMB2 2.2.10 and 3.2.5.5 */
1951+
if (tcon->share_flags & SMB2_SHAREFLAG_ISOLATED_TRANSPORT)
1952+
server->nosharesock = true;
19501953
tcon_exit:
19511954

19521955
free_rsp_buf(resp_buftype, rsp);

0 commit comments

Comments
 (0)