Skip to content

Commit

Permalink
Allow receiving multiple FD over ControlMessage in unix sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Jun 5, 2017
1 parent 18f6a1c commit 18f705d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#541](https://github.com/nix-rust/nix/pull/541))

### Fixed
- Fixed receiving multiple File Descriptors over a Unix Socket
([#473](https://github.com/nix-rust/nix/pull/473))
- Fixed multiple issues with Unix domain sockets on non-Linux OSes
([#474](https://github.com/nix-rust/nix/pull/415))
- Fixed using kqueue with `EVFILT_USER` on FreeBSD
Expand Down
2 changes: 1 addition & 1 deletion src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl<'a> Iterator for CmsgIterator<'a> {
(SOL_SOCKET, SCM_RIGHTS) => unsafe {
Some(ControlMessage::ScmRights(
slice::from_raw_parts(
&cmsg.cmsg_data as *const _ as *const _, 1)))
&cmsg.cmsg_data as *const _ as *const _, len / mem::size_of::<RawFd>())))
},
(_, _) => unsafe {
Some(ControlMessage::Unknown(UnknownCmsg(
Expand Down

0 comments on commit 18f705d

Please sign in to comment.