-
Notifications
You must be signed in to change notification settings - Fork 675
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
Add support for SockAddr::Link
when receiving packets
#1344
Conversation
There was a problem hiding this 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)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"))] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
I'm afraid you'll need to rebase to fix the CHANGELOG. |
@asomers is there anything left I can do to get this over the finish line? |
There was a problem hiding this 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+
fixes #1343