linux-stable/fs/cifs
Jeff Layton 9ae6cf606a cifs: stop trying to use virtual circuits
Currently, we try to ensure that we use vcnum of 0 on the first
established session on a connection and then try to use a different
vcnum on each session after that.

This is a little odd, since there's no real reason to use a different
vcnum for each SMB session. I can only assume there was some confusion
between SMB sessions and VCs. That's somewhat understandable since they
both get created during SESSION_SETUP, but the documentation indicates
that they are really orthogonal. The comment on max_vcs in particular
looks quite misguided. An SMB session is already uniquely identified
by the SMB UID value -- there's no need to again uniquely ID with a
VC.

Furthermore, a vcnum of 0 is a cue to the server that it should release
any resources that were previously held by the client. This sounds like
a good thing, until you consider that:

a) it totally ignores the fact that other programs on the box (e.g.
smbclient) might have connections established to the server. Using a
vcnum of 0 causes them to get kicked off.

b) it causes problems with NAT. If several clients are connected to the
same server via the same NAT'ed address, whenever one connects to the
server it kicks off all the others, which then reconnect and kick off
the first one...ad nauseum.

I don't see any reason to ignore the advice in "Implementing CIFS" which
has a comprehensive treatment of virtual circuits. In there, it states
"...and contrary to the specs the client should always use a VcNumber of
one, never zero."

Have the client just use a hardcoded vcnum of 1, and stop abusing the
special behavior of vcnum 0.

Reported-by: Sauron99@gmx.de <sauron99@gmx.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
2013-09-18 10:23:44 -05:00
..
asn1.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cache.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cifs_debug.c cifs: try to handle the MUST SecurityFlags sanely 2013-06-26 17:31:55 -05:00
cifs_debug.h [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cifs_dfs_ref.c cifs: fix composing of mount options for DFS referrals 2013-05-24 13:08:31 -05:00
cifs_fs_sb.h cifs: Convert struct cifs_sb_info to use kuids and kgids 2013-02-13 07:28:54 -08:00
cifs_spnego.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cifs_spnego.h [CIFS] Rename three structures to avoid camel case 2011-05-27 04:34:02 +00:00
cifs_unicode.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cifs_unicode.h cifs: add new case-insensitive conversion routines that are based on wchar_t's 2013-09-08 14:38:05 -05:00
cifs_uniupr.h cifs: correction of unicode header files 2010-08-20 00:46:42 +00:00
cifsacl.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cifsacl.h cifs: fix SID binary to string conversion 2012-12-11 11:48:49 -06:00
cifsencrypt.c cifs: fix bad error handling in crypto code 2013-07-31 13:44:59 -05:00
cifsfs.c CIFS: Respect epoch value from create lease context v2 2013-09-09 22:52:18 -05:00
cifsfs.h Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 2013-07-03 14:06:30 -07:00
cifsglob.h cifs: stop trying to use virtual circuits 2013-09-18 10:23:44 -05:00
cifspdu.h CIFS: Implement follow_link for nounix CIFS mounts 2013-09-08 14:27:41 -05:00
cifsproto.h cifs: Start using per session key for smb2/3 for signature generation 2013-09-08 14:47:50 -05:00
cifssmb.c cifs: stop trying to use virtual circuits 2013-09-18 10:23:44 -05:00
connect.c CIFS: Store lease state itself rather than a mapped oplock value 2013-09-09 22:52:05 -05:00
dir.c cifs: convert case-insensitive dentry ops to use new case conversion routines 2013-09-08 14:38:08 -05:00
dns_resolve.c cifs: fix composing of mount options for DFS referrals 2013-05-24 13:08:31 -05:00
dns_resolve.h DNS: Separate out CIFS DNS Resolver code 2010-08-05 17:17:51 +00:00
export.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
file.c CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them 2013-09-18 10:17:03 -05:00
fscache.c CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them 2013-09-18 10:17:03 -05:00
fscache.h CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them 2013-09-18 10:17:03 -05:00
inode.c Merge branch 'akpm' (patches from Andrew Morton) 2013-09-12 15:44:27 -07:00
ioctl.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
Kconfig [CIFS] SMB3 Signing enablement 2013-06-26 23:45:05 -05:00
link.c CIFS: Implement follow_link for SMB2 2013-09-08 14:27:34 -05:00
Makefile cifs: add new case-insensitive conversion routines that are based on wchar_t's 2013-09-08 14:38:05 -05:00
misc.c CIFS: Replace clientCanCache* bools with an integer 2013-09-08 17:49:17 -05:00
netmisc.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
nterr.c CIFS: Rename 7 error codes to NT_ style 2012-07-24 10:25:10 -05:00
nterr.h CIFS: Rename 7 error codes to NT_ style 2012-07-24 10:25:10 -05:00
ntlmssp.h CIFS: Add session setup/logoff capability for SMB2 2012-07-24 21:54:57 +04:00
readdir.c CIFS: Implement follow_link for SMB2 2013-09-08 14:27:34 -05:00
rfc1002pdu.h
sess.c cifs: stop trying to use virtual circuits 2013-09-18 10:23:44 -05:00
smb1ops.c CIFS: Store lease state itself rather than a mapped oplock value 2013-09-09 22:52:05 -05:00
smb2file.c CIFS: Store lease state itself rather than a mapped oplock value 2013-09-09 22:52:05 -05:00
smb2glob.h [CIFS] SMB3 Signing enablement 2013-06-26 23:45:05 -05:00
smb2inode.c CIFS: Implement follow_link for SMB2 2013-09-08 14:27:34 -05:00
smb2maperror.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
smb2misc.c CIFS: Respect epoch value from create lease context v2 2013-09-09 22:52:18 -05:00
smb2ops.c CIFS: Respect epoch value from create lease context v2 2013-09-09 22:52:18 -05:00
smb2pdu.c CIFS: Respect epoch value from create lease context v2 2013-09-09 22:52:18 -05:00
smb2pdu.h CIFS: Add create lease v2 context for SMB3 2013-09-09 22:52:14 -05:00
smb2proto.h CIFS: Store lease state itself rather than a mapped oplock value 2013-09-09 22:52:05 -05:00
smb2status.h CIFS: Add SMB2 status codes 2012-07-24 10:25:13 -05:00
smb2transport.c cifs: Start using per session key for smb2/3 for signature generation 2013-09-08 14:47:50 -05:00
smbencrypt.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
smberr.h cifs: map NT_STATUS_ERROR_WRITE_PROTECTED to -EROFS 2010-08-02 12:40:40 +00:00
smbfsctl.h Update headers to update various SMB3 ioctl definitions 2013-06-24 01:56:47 -05:00
transport.c Power management and ACPI updates for 3.11-rc1 2013-07-03 14:35:40 -07:00
winucase.c [CIFS] quiet sparse compile warning 2013-09-08 14:54:24 -05:00
xattr.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00