Skip to content

Commit

Permalink
big endian fix
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan Mars <code@rohanmars.com>
  • Loading branch information
rohanmars committed Nov 12, 2015
1 parent cf3e498 commit f1b1a10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/auth/cephx/CephxSessionHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ int CephxSessionHandler::_calc_signature(Message *m, uint64_t *psig)
__le32 middle_crc;
__le32 data_crc;
} __attribute__ ((packed)) sigblock = {
1, AUTH_ENC_MAGIC, 4*4,
header.crc, footer.front_crc, footer.middle_crc, footer.data_crc
1, mswab64(AUTH_ENC_MAGIC), mswab32(4*4),
mswab32(header.crc), mswab32(footer.front_crc),
mswab32(footer.middle_crc), mswab32(footer.data_crc)
};
bufferlist bl_plaintext;
bl_plaintext.append(buffer::create_static(sizeof(sigblock), (char*)&sigblock));
Expand Down

0 comments on commit f1b1a10

Please sign in to comment.