diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2021-11-03 02:08:44 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-11-12 04:22:58 +0300 |
commit | cb4517201b8acdb5fd5314494aaf86c267f22345 (patch) | |
tree | ae6b4de2868277fe8b40186861d9e1bbc467c6f4 /fs/ksmbd/auth.c | |
parent | 561a1cf57535154f094f31167a9170197caae686 (diff) | |
download | linux-cb4517201b8acdb5fd5314494aaf86c267f22345.tar.xz |
ksmbd: remove smb2_buf_length in smb2_hdr
To move smb2_hdr to smbfs_common, This patch remove smb2_buf_length
variable in smb2_hdr. Also, declare smb2_get_msg function to get smb2
request/response from ->request/response_buf.
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/auth.c')
-rw-r--r-- | fs/ksmbd/auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ksmbd/auth.c b/fs/ksmbd/auth.c index 30a92ddc1817..c69c5471db1c 100644 --- a/fs/ksmbd/auth.c +++ b/fs/ksmbd/auth.c @@ -873,9 +873,9 @@ int ksmbd_gen_preauth_integrity_hash(struct ksmbd_conn *conn, char *buf, __u8 *pi_hash) { int rc; - struct smb2_hdr *rcv_hdr = (struct smb2_hdr *)buf; + struct smb2_hdr *rcv_hdr = smb2_get_msg(buf); char *all_bytes_msg = (char *)&rcv_hdr->ProtocolId; - int msg_size = be32_to_cpu(rcv_hdr->smb2_buf_length); + int msg_size = get_rfc1002_len(buf); struct ksmbd_crypto_ctx *ctx = NULL; if (conn->preauth_info->Preauth_HashId != |