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

Add support for SockAddr::Link when receiving packets #1344

Merged
merged 1 commit into from Jan 31, 2021
Merged

Add support for SockAddr::Link when receiving packets #1344

merged 1 commit into from Jan 31, 2021

Conversation

internetionals
Copy link
Contributor

fixes #1343

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.

Looks pretty good. Let's just try adding fuchsia support.

CHANGELOG.md Outdated
@@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added `mremap` (#[1306](https://github.com/nix-rust/nix/pull/1306))
### Changed
### Fixed
- Fixed calling `recvfrom` on an `AddrFamily::Packet` socket (#[1344](https://github.com/nix-rust/nix/pull/1344))
Copy link
Member

Choose a reason for hiding this comment

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

Wrap to 80 cols, please.

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

@@ -1719,6 +1719,15 @@ pub fn sockaddr_storage_to_addr(
Ok(SockAddr::Unix(UnixAddr(sun, pathlen)))
}
#[cfg(any(target_os = "android", target_os = "linux"))]
Copy link
Member

Choose a reason for hiding this comment

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

You can add fuchsia here.

Copy link
Member

Choose a reason for hiding this comment

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

Err, wait on that. Fuchsia support hasn't merged yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While the Fuchsia's libc (being a based on a Musl fork) has the defines and structures, I don't think it actually supports raw packet sockets (based on a cursory glance of it's own API) and that they're really just relics of the fork. But given that it's in their libc might be enough of a reason to support it.

@asomers
Copy link
Member

asomers commented Dec 2, 2020

I'm afraid you'll need to rebase to fix the CHANGELOG.

@internetionals
Copy link
Contributor Author

@asomers is there anything left I can do to get this over the finish line?

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.

Sorry I've been ignoring this. I don't have much time to work on Nix anymore. But the PR looks good now.

bors r+

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.

unexpected address family 17
2 participants