Skip to content

Commit 2fe4f62

Browse files
committed
SMB3: Add new compression flags
Additional compression capabilities can now be negotiated and a new compression algorithm. Add the flags for these. See newly updated MS-SMB2 sections 3.1.4.4.1 and 2.2.3.1.3 Signed-off-by: Steve French <[email protected]> Acked-by: Ronnie Sahlberg <[email protected]>
1 parent cff2def commit 2fe4f62

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/cifs/smb2pdu.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,17 @@ struct smb2_encryption_neg_context {
307307
#define SMB3_COMPRESS_LZNT1 cpu_to_le16(0x0001)
308308
#define SMB3_COMPRESS_LZ77 cpu_to_le16(0x0002)
309309
#define SMB3_COMPRESS_LZ77_HUFF cpu_to_le16(0x0003)
310+
/* Pattern scanning algorithm See MS-SMB2 3.1.4.4.1 */
311+
#define SMB3_COMPRESS_PATTERN cpu_to_le16(0x0004)
312+
313+
/* Compression Flags */
314+
#define SMB2_COMPRESSION_CAPABILITIES_FLAG_NONE cpu_to_le32(0x00000000)
315+
#define SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED cpu_to_le32(0x00000001)
310316

311317
struct smb2_compression_capabilities_context {
312318
__le16 ContextType; /* 3 */
313319
__le16 DataLength;
314-
__u32 Reserved;
320+
__u32 Flags;
315321
__le16 CompressionAlgorithmCount;
316322
__u16 Padding;
317323
__u32 Reserved1;

0 commit comments

Comments
 (0)