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

Relax assertions in sockaddr_storage_to_addr to match the documentation. #1486

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

khuey
Copy link
Contributor

@khuey khuey commented Aug 10, 2021

Fixes #1479

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

The tests you modified are now doing two completely different things. Better to split them up, testing only the minimal amount of functionality in each test.

@khuey khuey requested a review from asomers August 11, 2021 13:30
let storage_ptr = storage.as_mut_ptr().cast::<sockaddr_in6>();
let (ffi_ptr, ffi_size) = sockaddr.as_ffi_pair();
// XXX this does not pass.
// assert_eq!(mem::size_of::<sockaddr>(), ffi_size as usize);
Copy link
Member

Choose a reason for hiding this comment

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

You should delete this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@khuey khuey requested a review from asomers August 17, 2021 16:56
@asomers
Copy link
Member

asomers commented Aug 18, 2021

You'll need to rebase to fix the test failures.

@khuey
Copy link
Contributor Author

khuey commented Aug 18, 2021

Done.

@asomers
Copy link
Member

asomers commented Aug 18, 2021

Just one more thing: would you mind squashing your commits?

@khuey
Copy link
Contributor Author

khuey commented Aug 18, 2021

Done.

Copy link
Member

@asomers asomers 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 Aug 18, 2021
1486: Relax assertions in sockaddr_storage_to_addr to match the documentation. r=asomers a=khuey

Fixes #1479

1490: add libc::IP6T_SO_ORIGINAL_DST to socket opt r=asomers a=bearice

the original PR #1410 was stalled for a while
let's make it happen.

this should closes #1410 and #938

1493: Fix crates.io badge r=asomers a=atouchet



Co-authored-by: Kyle Huey <[email protected]>
Co-authored-by: Icemic <[email protected]>
Co-authored-by: Bearice Ren <[email protected]>
Co-authored-by: Alex Touchet <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 18, 2021

This PR was included in a batch that timed out, it will be automatically retried

bors bot added a commit that referenced this pull request Aug 18, 2021
1486: Relax assertions in sockaddr_storage_to_addr to match the documentation. r=asomers a=khuey

Fixes #1479

Co-authored-by: Kyle Huey <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 18, 2021

Timed out.

@asomers
Copy link
Member

asomers commented Aug 18, 2021

bors retry

@bors bors bot merged commit 7207004 into nix-rust:master Aug 18, 2021
@khuey
Copy link
Contributor Author

khuey commented Aug 18, 2021

Thanks.

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.

sockaddr_storage_to_addr is documented as being more lenient with the size than it is in practice
2 participants