]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/msg_types: entity_addrvec_t: fix decode on big-endian hosts 36813/head
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 3 Jul 2020 13:47:00 +0000 (15:47 +0200)
committerNathan Cutler <ncutler@suse.com>
Wed, 26 Aug 2020 09:26:35 +0000 (11:26 +0200)
commit4794ee41cf5d8c2f7de6ee3d199c72d289b7c98c
tree1140bd0cb5527c55b8a1f27d4cce7646dc50ff41
parent6430169ecae83d66439eaba96ef054a29bf4b5d8
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>
(cherry picked from commit 31da17378b712542e915adbf4084e0212b8bb615)
src/msg/msg_types.cc