]> git.baikalelectronics.ru Git - kernel.git/commit
[CIFS] Do not send SMBEcho requests on new sockets until SMBNegotiate
authorSteve French <sfrench@us.ibm.com>
Tue, 8 Feb 2011 23:52:32 +0000 (23:52 +0000)
committerSteve French <sfrench@us.ibm.com>
Tue, 8 Feb 2011 23:52:32 +0000 (23:52 +0000)
commit3c4fd0ed2905651138839ea7ee3faa25d9d6b58d
tree36752aa5c1005716d2ce91cbf020ab8c2602f129
parent869003efd1b68e37d3711bba73fdc4b999e3a7b7
[CIFS] Do not send SMBEcho requests on new sockets until SMBNegotiate

In order to determine whether an SMBEcho request can be sent
we need to know that the socket is established (server tcpStatus == CifsGood)
AND that an SMB NegotiateProtocol has been sent (server maxBuf != 0).
Without the second check we can send an Echo request during reconnection
before the server can accept it.

CC: JG <jg@cms.ac>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsglob.h
fs/cifs/connect.c