]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/msg_types: entity_addrvec_t: fix decode on big-endian hosts
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 3 Jul 2020 13:47:00 +0000 (15:47 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 3 Jul 2020 13:47:00 +0000 (15:47 +0200)
commit31da17378b712542e915adbf4084e0212b8bb615
tree7576216deada8b3f19ea923fcddfa502a6429aa8
parent319d123cfe5d6c8fb7de28ead84ecda48264558b
msg/msg_types: entity_addrvec_t: fix decode on big-endian hosts

When decoding an entity_addrvec_t with marker 1, we just have
a single (non-legacy) entity_addr_t.  This should be decoded
exactly the same as done by entity_addr_t::decode, but it
currently is not.  Specifically, the sa_family member of
the sockaddr is not converted from the on-wire little-endian
format to host byte order (as done by entity_addr_t::decode).

Fixed by using the same code as in entity_addr_t::decode.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
src/msg/msg_types.cc