File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
- i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated
19
19
by Xcode.
20
20
(#[ 1350] ( https://github.com/nix-rust/nix/pull/1350 ) )
21
+ - Fixed calling ` recvfrom ` on an ` AddrFamily::Packet ` socket
22
+ (#[ 1344] ( https://github.com/nix-rust/nix/pull/1344 ) )
21
23
22
24
### Removed
23
25
Original file line number Diff line number Diff line change @@ -1702,6 +1702,15 @@ pub fn sockaddr_storage_to_addr(
1702
1702
Ok ( SockAddr :: Unix ( UnixAddr ( sun, pathlen) ) )
1703
1703
}
1704
1704
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
1705
+ libc:: AF_PACKET => {
1706
+ use libc:: sockaddr_ll;
1707
+ assert_eq ! ( len as usize , mem:: size_of:: <sockaddr_ll>( ) ) ;
1708
+ let sll = unsafe {
1709
+ * ( addr as * const _ as * const sockaddr_ll )
1710
+ } ;
1711
+ Ok ( SockAddr :: Link ( LinkAddr ( sll) ) )
1712
+ }
1713
+ #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
1705
1714
libc:: AF_NETLINK => {
1706
1715
use libc:: sockaddr_nl;
1707
1716
let snl = unsafe {
You can’t perform that action at this time.
0 commit comments