summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-05-02 21:35:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-20 15:31:01 +0300
commit6716949b0029f5b92c185dedad321e7853f841dd (patch)
tree56d5edf5c53ab23f7192225144e898b1e6b07d49
parentb7174f40382813750fd2ef225cc0a5b19e9c89d4 (diff)
downloadlinux-6716949b0029f5b92c185dedad321e7853f841dd.tar.xz
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 2dc92351027b..a1016485468d 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -717,6 +717,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;