]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg: fix addr2 encoding for sockaddrs 28379/head
authorJeff Layton <jlayton@redhat.com>
Mon, 3 Jun 2019 14:55:37 +0000 (10:55 -0400)
committerJeff Layton <jlayton@redhat.com>
Wed, 5 Jun 2019 13:31:02 +0000 (09:31 -0400)
commit7b4b70b6853e036379a0aababec598d59edcecee
tree8db161137005cb6ccdce6b4ab9ebc47b6d733baf
parentdead71f5f91ee9ece2e305b05d5150c89ce43208
msg: fix addr2 encoding for sockaddrs

Currently, the sockaddr sa_family field is being sent across the wire
without any sort of endianness conversion.

Redefine the new-style entity_addr_t encoding to encode the sa_family
field as little-endian. This will allow LE machines in the field to
keep limping along, but note that BE machines may break until they are
all fixed.

To do this, use the code that was initially written for BSD/Apple
machines to encode the different fields separately.

Fixes: http://tracker.ceph.com/issues/40114
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/msg/msg_types.h