summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-05-02 13:35:20 -0500
committerBen Hutchings <ben@decadent.org.uk>2017-08-26 02:14:44 +0100
commit9690ad86f261871acfc7413f043e6a6467733755 (patch)
tree9f31a6d6048cc468edc74b4b5f43eb80bf548e86
parent888d12a24768e4f448fc8a58f25fcdf6dce5095f (diff)
downloadlinux-stable-9690ad86f261871acfc7413f043e6a6467733755.tar.gz
linux-stable-9690ad86f261871acfc7413f043e6a6467733755.tar.bz2
linux-stable-9690ad86f261871acfc7413f043e6a6467733755.zip
Set unicode flag on cifs echo request to avoid Mac error
commit 26c9cb668c7fbf9830516b75d8bee70b699ed449 upstream. 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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-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 90c8558383f5..36344cb2f1ca 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -720,6 +720,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;