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
@@ -661,16 +661,16 @@ set_credits(struct TCP_Server_Info *server, const int val)
|
||||
server->ops->set_credits(server, val);
|
||||
}
|
||||
|
||||
static inline __u64
|
||||
static inline __le64
|
||||
get_next_mid64(struct TCP_Server_Info *server)
|
||||
{
|
||||
return server->ops->get_next_mid(server);
|
||||
return cpu_to_le64(server->ops->get_next_mid(server));
|
||||
}
|
||||
|
||||
static inline __le16
|
||||
get_next_mid(struct TCP_Server_Info *server)
|
||||
{
|
||||
__u16 mid = get_next_mid64(server);
|
||||
__u16 mid = server->ops->get_next_mid(server);
|
||||
/*
|
||||
* The value in the SMB header should be little endian for easy
|
||||
* on-the-wire decoding.
|
||||
|
Reference in New Issue
Block a user