diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2016-10-25 00:33:04 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2017-02-01 23:46:34 +0100 |
commit | 31473fc4f9653b73750d3792ffce6a6e1bdf0da7 (patch) | |
tree | bb789f590f828d3da748de876a7fafa43e654e7a /fs/cifs/smb2maperror.c | |
parent | CIFS: Fix splice read for non-cached files (diff) | |
download | linux-31473fc4f9653b73750d3792ffce6a6e1bdf0da7.tar.xz linux-31473fc4f9653b73750d3792ffce6a6e1bdf0da7.zip |
CIFS: Separate SMB2 header structure
In order to support compounding and encryption we need to separate
RFC1001 length field and SMB2 header structure because the protocol
treats them differently. This change will allow to simplify parsing
of such complex SMB2 packets further.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2maperror.c')
-rw-r--r-- | fs/cifs/smb2maperror.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c index 8257a5a97cc0..3030a9dfb0dd 100644 --- a/fs/cifs/smb2maperror.c +++ b/fs/cifs/smb2maperror.c @@ -26,6 +26,7 @@ #include "smb2pdu.h" #include "smb2proto.h" #include "smb2status.h" +#include "smb2glob.h" struct status_to_posix_error { __le32 smb2_status; @@ -2449,10 +2450,10 @@ smb2_print_status(__le32 status) int map_smb2_to_linux_error(char *buf, bool log_err) { - struct smb2_hdr *hdr = (struct smb2_hdr *)buf; + struct smb2_sync_hdr *shdr = get_sync_hdr(buf); unsigned int i; int rc = -EIO; - __le32 smb2err = hdr->Status; + __le32 smb2err = shdr->Status; if (smb2err == 0) return 0; |