diff options
-rw-r--r-- | fs/cifs/smb2pdu.c | 2 | ||||
-rw-r--r-- | fs/cifs/smb2pdu.h | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index ca7f307ad97a..d65270c290a1 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -630,6 +630,8 @@ ssetup_ntlmssp_authenticate: | |||
630 | goto ssetup_exit; | 630 | goto ssetup_exit; |
631 | 631 | ||
632 | ses->session_flags = le16_to_cpu(rsp->SessionFlags); | 632 | ses->session_flags = le16_to_cpu(rsp->SessionFlags); |
633 | if (ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) | ||
634 | cifs_dbg(VFS, "SMB3 encryption not supported yet\n"); | ||
633 | ssetup_exit: | 635 | ssetup_exit: |
634 | free_rsp_buf(resp_buftype, rsp); | 636 | free_rsp_buf(resp_buftype, rsp); |
635 | 637 | ||
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h index b50a129572cd..f88320bbb477 100644 --- a/fs/cifs/smb2pdu.h +++ b/fs/cifs/smb2pdu.h | |||
@@ -122,6 +122,23 @@ struct smb2_pdu { | |||
122 | __le16 StructureSize2; /* size of wct area (varies, request specific) */ | 122 | __le16 StructureSize2; /* size of wct area (varies, request specific) */ |
123 | } __packed; | 123 | } __packed; |
124 | 124 | ||
125 | struct smb2_transform_hdr { | ||
126 | __be32 smb2_buf_length; /* big endian on wire */ | ||
127 | /* length is only two or three bytes - with | ||
128 | one or two byte type preceding it that MBZ */ | ||
129 | __u8 ProtocolId[4]; /* 0xFD 'S' 'M' 'B' */ | ||
130 | __u8 Signature[16]; | ||
131 | __u8 Nonce[11]; | ||
132 | __u8 Reserved[5]; | ||
133 | __le32 OriginalMessageSize; | ||
134 | __u16 Reserved1; | ||
135 | __le16 EncryptionAlgorithm; | ||
136 | __u64 SessionId; | ||
137 | } __packed; | ||
138 | |||
139 | /* Encryption Algorithms */ | ||
140 | #define SMB2_ENCRYPTION_AES128_CCM __constant_cpu_to_le16(0x0001) | ||
141 | |||
125 | /* | 142 | /* |
126 | * SMB2 flag definitions | 143 | * SMB2 flag definitions |
127 | */ | 144 | */ |
@@ -237,6 +254,7 @@ struct smb2_sess_setup_req { | |||
237 | /* Currently defined SessionFlags */ | 254 | /* Currently defined SessionFlags */ |
238 | #define SMB2_SESSION_FLAG_IS_GUEST 0x0001 | 255 | #define SMB2_SESSION_FLAG_IS_GUEST 0x0001 |
239 | #define SMB2_SESSION_FLAG_IS_NULL 0x0002 | 256 | #define SMB2_SESSION_FLAG_IS_NULL 0x0002 |
257 | #define SMB2_SESSION_FLAG_ENCRYPT_DATA 0x0004 | ||
240 | struct smb2_sess_setup_rsp { | 258 | struct smb2_sess_setup_rsp { |
241 | struct smb2_hdr hdr; | 259 | struct smb2_hdr hdr; |
242 | __le16 StructureSize; /* Must be 9 */ | 260 | __le16 StructureSize; /* Must be 9 */ |