msg: bad address encoding when CEPH_FEATURE_MSG_ADDR2 enabled
On Linux, entity_addr_t::encode just copies the sockaddr as-is into the bufferlist, without fixing up the endianness of sa_family. entity_addr_t::decode copies it out in reverse cloaking the bug when the encoder and decoder are the same endianness.
The family field should be net-endian (as it is for legacy addrs), since there is no way for the other end to know what byte-order we're using.
Fixing this is rather simple, but how to deal with hosts already in the field?
#3 Updated by Patrick Donnelly over 3 years ago
- Subject changed from bad address encoding when CEPH_FEATURE_MSG_ADDR2 enabled to msg: bad address encoding when CEPH_FEATURE_MSG_ADDR2 enabled
- Status changed from New to Fix Under Review
- Assignee set to Jeff Layton
- Priority changed from Normal to Urgent
- Target version set to v15.0.0
- Start date deleted (
- Source set to Development
- Backport set to nautilus
- Pull request ID set to 28379