Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
Set unicode flag on cifs echo request to avoid Mac error
Browse files Browse the repository at this point in the history
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 <[email protected]>
CC: Stable <[email protected]>
  • Loading branch information
smfrench committed May 2, 2017
1 parent c610c4b commit 26c9cb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,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;
Expand Down

0 comments on commit 26c9cb6

Please sign in to comment.