msg/msg_types: entity_addrvec_t: fix decode on big-endian hosts#35920
Merged
tchaikov merged 1 commit intoceph:masterfrom Jul 6, 2020
uweigand:entity-addrvec-fix
Merged
msg/msg_types: entity_addrvec_t: fix decode on big-endian hosts#35920tchaikov merged 1 commit intoceph:masterfrom uweigand:entity-addrvec-fix
tchaikov merged 1 commit intoceph:masterfrom
uweigand:entity-addrvec-fix
Conversation
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>
Contributor
Author
|
jenkins retest this please |
tchaikov
approved these changes
Jul 5, 2020
This was referenced Aug 26, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard backendjenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox