cifs: update calc_size to take a server argument
and change the smb2 version to take heder_preamble_size into account instead of hardcoding it as 4 bytes. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:

committed by
Steve French

parent
14547f7d74
commit
9ec672bd17
@@ -903,7 +903,7 @@ map_smb_to_linux_error(char *buf, bool logErr)
|
||||
* portion, the number of word parameters and the data portion of the message
|
||||
*/
|
||||
unsigned int
|
||||
smbCalcSize(void *buf)
|
||||
smbCalcSize(void *buf, struct TCP_Server_Info *server)
|
||||
{
|
||||
struct smb_hdr *ptr = (struct smb_hdr *)buf;
|
||||
return (sizeof(struct smb_hdr) + (2 * ptr->WordCount) +
|
||||
|
Reference in New Issue
Block a user