Convert MessageID in smb2_hdr to LE
We have encountered failures when When testing smb2 mounts on ppc64 machines when using both Samba as well as Windows 2012. On poking around, the problem was determined to be caused by the high endian MessageID passed in the header for smb2. On checking the corresponding MID for smb1 is converted to LE before being sent on the wire. We have tested this patch successfully on a ppc64 machine. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
This commit is contained in:

committed by
Steve French

parent
9ea18f8cab
commit
9235d09873
@@ -176,10 +176,11 @@ smb2_find_mid(struct TCP_Server_Info *server, char *buf)
|
||||
{
|
||||
struct mid_q_entry *mid;
|
||||
struct smb2_hdr *hdr = (struct smb2_hdr *)buf;
|
||||
__u64 wire_mid = le64_to_cpu(hdr->MessageId);
|
||||
|
||||
spin_lock(&GlobalMid_Lock);
|
||||
list_for_each_entry(mid, &server->pending_mid_q, qhead) {
|
||||
if ((mid->mid == hdr->MessageId) &&
|
||||
if ((mid->mid == wire_mid) &&
|
||||
(mid->mid_state == MID_REQUEST_SUBMITTED) &&
|
||||
(mid->command == hdr->Command)) {
|
||||
spin_unlock(&GlobalMid_Lock);
|
||||
|
Reference in New Issue
Block a user