Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the retrieve of the UNIX address as an UnsafeMutablePointer for b… #177

Merged
merged 1 commit into from Aug 27, 2019

Conversation

levivic
Copy link
Contributor

@levivic levivic commented Aug 16, 2019

…ig endian

Description

When retrieving the UNIX address as an UnsafeMutablePointer, the current code was only for little endian. Therefore, on big endian platform, the field, i.e., sa_family_t, of such an UnsafeMutablePointer cannot be correctly recovered.

Motivation and Context

The fix is to swap the byte mapping to address of afUnixShort, which is an UInt16 on big endian platform.

How Has This Been Tested?

Run swift test, all tests got passed. Also, failures in Kitura because of this issue got fixed after the fix.

Checklist:

  • I have submitted a CLA form
  • If applicable, I have updated the documentation accordingly.
  • If applicable, I have added tests to cover my changes.

@CLAassistant
Copy link

CLAassistant commented Aug 16, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@billabt billabt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@billabt billabt merged commit 3861756 into Kitura:master Aug 27, 2019
@levivic
Copy link
Contributor Author

levivic commented Aug 27, 2019

Thanks.

@levivic levivic deleted the BE-socket-unixAddress branch August 28, 2019 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants