summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-05-02 13:35:20 -0500
committerSasha Levin <alexander.levin@verizon.com>2017-05-17 15:08:24 -0400
commit31390049dfd2b65da315f0e4f5d98f115ce09352 (patch)
treeaf864ac9683b3dbd1f363ab73f5aa8eb9125c667 /fs/cifs
parent3ea80afb2dceac32a72647ceaf2d613a4962ffb5 (diff)
Set unicode flag on cifs echo request to avoid Mac error
[ Upstream commit 26c9cb668c7fbf9830516b75d8bee70b699ed449 ] Mac requires the unicode flag to be set for cifs, even for the smb echo request (which doesn't have strings). Without this Mac rejects the periodic echo requests (when mounting with cifs) that we use to check if server is down Signed-off-by: Steve French <smfrench@gmail.com> CC: Stable <stable@vger.kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifssmb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index f1a5067d5494..b3f401bb281a 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -716,6 +716,9 @@ CIFSSMBEcho(struct TCP_Server_Info *server)
if (rc)
return rc;
+ if (server->capabilities & CAP_UNICODE)
+ smb->hdr.Flags2 |= SMBFLG2_UNICODE;
+
/* set up echo request */
smb->hdr.Tid = 0xffff;
smb->hdr.WordCount = 1;