SMB3.1.1: fix mount failure to some servers when compression enabled
authorSteve French <stfrench@microsoft.com>
Thu, 15 Jul 2021 04:32:09 +0000 (23:32 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 16 Jul 2021 00:07:04 +0000 (19:07 -0500)
When sending the compression context to some servers, they rejected
the SMB3.1.1 negotiate protocol because they expect the compression
context to have a data length of a multiple of 8.

Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.h

index 4b27cb9..e9cac79 100644 (file)
@@ -394,6 +394,7 @@ struct smb2_compression_capabilities_context {
        __u16   Padding;
        __u32   Flags;
        __le16  CompressionAlgorithms[3];
+       __u16   Pad;  /* Some servers require pad to DataLen multiple of 8 */
        /* Check if pad needed */
 } __packed;