• Joel Becker's avatar
    ocfs2: Fix endian bug in o2dlm protocol negotiation. · 0f71b7b4
    Joel Becker authored
    struct dlm_query_join_packet is made up of four one-byte fields.  They
    are effectively in big-endian order already.  However, little-endian
    machines swap them before putting the packet on the wire (because
    query_join's response is a status, and that status is treated as a u32
    on the wire).  Thus, a big-endian and little-endian machines will
    treat this structure differently.
    
    The solution is to have little-endian machines swap the structure when
    converting from the structure to the u32 representation.
    Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
    Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
    0f71b7b4
dlmdomain.c 46.1 KB