diff options
author | Steve French <stfrench@microsoft.com> | 2023-08-25 07:29:18 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-08-25 07:37:06 +0300 |
commit | 09ee7a3bf866c0fa5ee1914d2c65958559eb5b4c (patch) | |
tree | 28032714614a3bbbe83a8b948d5def6164ad81cd /fs/smb/client/cifsglob.h | |
parent | b6d44d42313baa45a81ce9b299aeee2ccf3d0ee1 (diff) | |
download | linux-09ee7a3bf866c0fa5ee1914d2c65958559eb5b4c.tar.xz |
[SMB3] send channel sequence number in SMB3 requests after reconnects
The ChannelSequence field in the SMB3 header is supposed to be
increased after reconnect to allow the server to distinguish
requests from before and after the reconnect. We had always
been setting it to zero. There are cases where incrementing
ChannelSequence on requests after network reconnects can reduce
the chance of data corruptions.
See MS-SMB2 3.2.4.1 and 3.2.7.1
Signed-off-by: Steve French <stfrench@microsoft.com>
Cc: stable@vger.kernel.org # 5.16+
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r-- | fs/smb/client/cifsglob.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 1588f98660aa..3271be65fd6f 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -747,6 +747,7 @@ struct TCP_Server_Info { */ #define CIFS_SERVER_IS_CHAN(server) (!!(server)->primary_server) struct TCP_Server_Info *primary_server; + __u16 channel_sequence_num; /* incremented on primary channel on each chan reconnect */ #ifdef CONFIG_CIFS_SWN_UPCALL bool use_swn_dstaddr; |