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>
This commit is contained in:

committed by
Steve French

parent
9c25702cee
commit
31473fc4f9
@@ -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;
|
||||
|
Reference in New Issue
Block a user