Skip to content

Commit

Permalink
SMB3: Fix endian warning
Browse files Browse the repository at this point in the history
Multi-dialect negotiate patch had a minor endian error.

Signed-off-by: Steve French <[email protected]>
Reviewed-by: Ronnie Sahlberg <[email protected]>
CC: Stable <[email protected]> # 4.13+
  • Loading branch information
smfrench committed Sep 20, 2017
1 parent 23586b6 commit 590d08d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/cifs/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,11 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
/* ops set to 3.0 by default for default so update */
ses->server->ops = &smb21_operations;
}
} else if (rsp->DialectRevision != ses->server->vals->protocol_id) {
} else if (le16_to_cpu(rsp->DialectRevision) !=
ses->server->vals->protocol_id) {
/* if requested single dialect ensure returned dialect matched */
cifs_dbg(VFS, "Illegal 0x%x dialect returned: not requested\n",
cpu_to_le16(rsp->DialectRevision));
le16_to_cpu(rsp->DialectRevision));
return -EIO;
}

Expand Down

0 comments on commit 590d08d

Please sign in to comment.