]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Set unicode flag on cifs echo request to avoid Mac error
authorSteve French <smfrench@gmail.com>
Tue, 2 May 2017 18:35:20 +0000 (13:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:31:01 +0000 (14:31 +0200)
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>
fs/cifs/cifssmb.c

index 2dc92351027b4ee4ac6662b18a018833e44c337b..a1016485468d1b35f73a14586c455ae0a96b240c 100644 (file)
@@ -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;