]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.11.2/set-unicode-flag-on-cifs-echo-request-to-avoid-mac-error.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.11.2 / set-unicode-flag-on-cifs-echo-request-to-avoid-mac-error.patch
CommitLineData
5032628c
GKH
1From 26c9cb668c7fbf9830516b75d8bee70b699ed449 Mon Sep 17 00:00:00 2001
2From: Steve French <smfrench@gmail.com>
3Date: Tue, 2 May 2017 13:35:20 -0500
4Subject: Set unicode flag on cifs echo request to avoid Mac error
5
6From: Steve French <smfrench@gmail.com>
7
8commit 26c9cb668c7fbf9830516b75d8bee70b699ed449 upstream.
9
10Mac requires the unicode flag to be set for cifs, even for the smb
11echo request (which doesn't have strings).
12
13Without this Mac rejects the periodic echo requests (when mounting
14with cifs) that we use to check if server is down
15
16Signed-off-by: Steve French <smfrench@gmail.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19---
20 fs/cifs/cifssmb.c | 3 +++
21 1 file changed, 3 insertions(+)
22
23--- a/fs/cifs/cifssmb.c
24+++ b/fs/cifs/cifssmb.c
25@@ -718,6 +718,9 @@ CIFSSMBEcho(struct TCP_Server_Info *serv
26 if (rc)
27 return rc;
28
29+ if (server->capabilities & CAP_UNICODE)
30+ smb->hdr.Flags2 |= SMBFLG2_UNICODE;
31+
32 /* set up echo request */
33 smb->hdr.Tid = 0xffff;
34 smb->hdr.WordCount = 1;