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 a panic in Linkaddr::addr #1675

Merged
merged 1 commit into from
Mar 13, 2022
Merged

Fix a panic in Linkaddr::addr #1675

merged 1 commit into from
Mar 13, 2022

Conversation

asomers
Copy link
Member

@asomers asomers commented Mar 13, 2022

The function assumed something about the values of the sockaddr_dl's
fields. But because the inner type is public, we musn't do that. The
only solution is to change the function's signature to return an Option.

@asomers asomers requested a review from rtzoeller March 13, 2022 22:17
Copy link
Collaborator

@rtzoeller rtzoeller left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot added a commit that referenced this pull request Mar 13, 2022
1675: Fix a panic in Linkaddr::addr r=rtzoeller a=asomers

The function assumed something about the values of the sockaddr_dl's
fields.  But because the inner type is public, we musn't do that.  The
only solution is to change the function's signature to return an Option.

Co-authored-by: Alan Somers <asomers@gmail.com>
@bors
Copy link
Contributor

bors bot commented Mar 13, 2022

Build failed:

The function assumed something about the values of the sockaddr_dl's
fields.  But because the inner type is public, we musn't do that.  The
only solution is to change the function's signature to return an Option.
@asomers
Copy link
Member Author

asomers commented Mar 13, 2022

bors retry

@bors bors bot merged commit 342585c into nix-rust:master Mar 13, 2022
asomers added a commit to asomers/nix that referenced this pull request Mar 14, 2022
bors bot added a commit that referenced this pull request Mar 14, 2022
1677: Use the same signature for LinkAddr::addr on all platforms r=rtzoeller a=asomers

This should've been done as part of #1675

Co-authored-by: Alan Somers <asomers@gmail.com>
bors bot added a commit that referenced this pull request Mar 14, 2022
1677: Use the same signature for LinkAddr::addr on all platforms r=rtzoeller a=asomers

This should've been done as part of #1675

Co-authored-by: Alan Somers <asomers@gmail.com>
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

2 participants