Skip to content

Commit 3d6b15a

Browse files
author
Steve French
committed
SMB3.1.1: correct definition for app_instance_id create contexts
The name lengths were incorrect for two create contexts. SMB2_CREATE_APP_INSTANCE_ID SMB2_CREATE_APP_INSTANCE_VERSION Update the definitions for these two to match the protocol specs. Acked-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 26c009d commit 3d6b15a

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

fs/ksmbd/smb2pdu.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,6 @@ struct create_durable_reconn_v2_req {
8181
__le32 Flags;
8282
} __packed;
8383

84-
struct create_app_inst_id {
85-
struct create_context ccontext;
86-
__u8 Name[8];
87-
__u8 Reserved[8];
88-
__u8 AppInstanceId[16];
89-
} __packed;
90-
91-
struct create_app_inst_id_vers {
92-
struct create_context ccontext;
93-
__u8 Name[8];
94-
__u8 Reserved[2];
95-
__u8 Padding[4];
96-
__le64 AppInstanceVersionHigh;
97-
__le64 AppInstanceVersionLow;
98-
} __packed;
99-
10084
struct create_alloc_size_req {
10185
struct create_context ccontext;
10286
__u8 Name[8];

fs/smbfs_common/smb2pdu.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,26 @@ struct create_disk_id_rsp {
12501250
__u8 Reserved[16];
12511251
} __packed;
12521252

1253+
/* See MS-SMB2 2.2.13.2.13 */
1254+
struct create_app_inst_id {
1255+
struct create_context ccontext;
1256+
__u8 Name[16];
1257+
__le32 StructureSize; /* Must be 20 */
1258+
__u16 Reserved;
1259+
__u8 AppInstanceId[16];
1260+
} __packed;
1261+
1262+
/* See MS-SMB2 2.2.13.2.15 */
1263+
struct create_app_inst_id_vers {
1264+
struct create_context ccontext;
1265+
__u8 Name[16];
1266+
__le32 StructureSize; /* Must be 24 */
1267+
__u16 Reserved;
1268+
__u32 Padding;
1269+
__le64 AppInstanceVersionHigh;
1270+
__le64 AppInstanceVersionLow;
1271+
} __packed;
1272+
12531273
/* See MS-SMB2 2.2.31 and 2.2.32 */
12541274
struct smb2_ioctl_req {
12551275
struct smb2_hdr hdr;

0 commit comments

Comments
 (0)