Skip to content

Commit

Permalink
cifs endianness fixes
Browse files Browse the repository at this point in the history
__le16 fields used as host-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Steve French <smfrench@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jun 4, 2008
1 parent 6399e7a commit 1d92cfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3927,9 +3927,9 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
}

ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals);
if (ref->VersionNumber != 3) {
if (ref->VersionNumber != cpu_to_le16(3)) {
cERROR(1, ("Referrals of V%d version are not supported,"
"should be V3", ref->VersionNumber));
"should be V3", le16_to_cpu(ref->VersionNumber)));
rc = -EINVAL;
goto parse_DFS_referrals_exit;
}
Expand Down Expand Up @@ -3977,7 +3977,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
if (rc)
goto parse_DFS_referrals_exit;

ref += ref->Size;
ref += le16_to_cpu(ref->Size);
}

parse_DFS_referrals_exit:
Expand Down

0 comments on commit 1d92cfd

Please sign in to comment.