CIFS: fix encryption in SMB3.1.1
authorAurelien Aptel <aaptel@suse.com>
Wed, 6 Jun 2018 14:42:51 +0000 (16:42 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Jun 2018 21:50:31 +0000 (16:50 -0500)
The smb2 hdr is now in iov 1

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c

index a42a1a796cb49ba3d2e117aec80810650b614f1a..aec03d586b160182064a4acc231c84c7451a3c4c 100644 (file)
@@ -2230,7 +2230,7 @@ static int
 crypt_message(struct TCP_Server_Info *server, struct smb_rqst *rqst, int enc)
 {
        struct smb2_transform_hdr *tr_hdr =
-                       (struct smb2_transform_hdr *)rqst->rq_iov[0].iov_base;
+                       (struct smb2_transform_hdr *)rqst->rq_iov[1].iov_base;
        unsigned int assoc_data_len = sizeof(struct smb2_transform_hdr) - 20;
        int rc = 0;
        struct scatterlist *sg;