Commit cd311445 authored by ZhangGuoDong's avatar ZhangGuoDong Committed by Steve French
Browse files

smb: move SMB1_PROTO_NUMBER to common/smbglob.h



Replace the constant of client with SMB1_PROTO_NUMBER, then move the
macro definition from server/smb_common.h to common/smbglob.h.

Co-developed-by: default avatarChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: default avatarChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: default avatarZhangGuoDong <zhangguodong@kylinos.cn>
Suggested-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 36c31540
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static int
check_smb_hdr(struct smb_hdr *smb)
{
	/* does it have the right SMB "signature" ? */
	if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff)) {
	if (*(__le32 *) smb->Protocol != SMB1_PROTO_NUMBER) {
		cifs_dbg(VFS, "Bad protocol string signature header 0x%x\n",
			 *(unsigned int *)smb->Protocol);
		return 1;
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
#ifndef _COMMON_SMB_GLOB_H
#define _COMMON_SMB_GLOB_H

#define SMB1_PROTO_NUMBER		cpu_to_le32(0x424d53ff)

struct smb_version_values {
	char		*version_string;
	__u16		protocol_id;
+0 −1
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@
		FILE_EXECUTE | FILE_DELETE_CHILD | \
		FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES)

#define SMB1_PROTO_NUMBER		cpu_to_le32(0x424d53ff)
#define SMB_COM_NEGOTIATE		0x72
#define SMB1_CLIENT_GUID_SIZE		(16)