]>
Commit | Line | Data |
---|---|---|
5032628c GKH |
1 | From 26c9cb668c7fbf9830516b75d8bee70b699ed449 Mon Sep 17 00:00:00 2001 |
2 | From: Steve French <smfrench@gmail.com> | |
3 | Date: Tue, 2 May 2017 13:35:20 -0500 | |
4 | Subject: Set unicode flag on cifs echo request to avoid Mac error | |
5 | ||
6 | From: Steve French <smfrench@gmail.com> | |
7 | ||
8 | commit 26c9cb668c7fbf9830516b75d8bee70b699ed449 upstream. | |
9 | ||
10 | Mac requires the unicode flag to be set for cifs, even for the smb | |
11 | echo request (which doesn't have strings). | |
12 | ||
13 | Without this Mac rejects the periodic echo requests (when mounting | |
14 | with cifs) that we use to check if server is down | |
15 | ||
16 | Signed-off-by: Steve French <smfrench@gmail.com> | |
17 | Signed-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; |