diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2011-12-27 16:12:43 +0400 |
---|---|---|
committer | Pavel Shilovsky <pshilovsky@samba.org> | 2012-07-24 21:54:55 +0400 |
commit | ec2e4523fdba88317e06d0c7a88af3a0860447fc (patch) | |
tree | 474781811d075dfb2e01345911fd0ff585f2d64a /fs/cifs/smb2misc.c | |
parent | 3792c1732878822ebf5a1c7e83e23453b9bbb698 (diff) |
CIFS: Add capability to send SMB2 negotiate message
and add negotiate request type to let set_credits know that
we are only on negotiate stage and no need to make a decision
about disabling echos and oplocks.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r-- | fs/cifs/smb2misc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index d4226782ec8..e4dede4ae05 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -199,7 +199,7 @@ static const bool has_smb2_data_area[NUMBER_OF_SMB2_COMMANDS] = { * Returns the pointer to the beginning of the data area. Length of the data * area and the offset to it (from the beginning of the smb are also returned. */ -static char * +char * smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *hdr) { *off = 0; @@ -218,6 +218,11 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *hdr) */ switch (hdr->Command) { case SMB2_NEGOTIATE: + *off = le16_to_cpu( + ((struct smb2_negotiate_rsp *)hdr)->SecurityBufferOffset); + *len = le16_to_cpu( + ((struct smb2_negotiate_rsp *)hdr)->SecurityBufferLength); + break; case SMB2_SESSION_SETUP: case SMB2_CREATE: case SMB2_READ: |