Skip to content

Commit

Permalink
Merge #1456
Browse files Browse the repository at this point in the history
1456: Add IpFreebind socket option r=asomers a=nox



Co-authored-by: Anthony Ramine <nox@nox.paris>
  • Loading branch information
bors[bot] and nox committed Jul 4, 2021
2 parents 7317e0a + c916e52 commit 58deca5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Added `if_nameindex` (#[1445](https://github.com/nix-rust/nix/pull/1445))
- Added `nmount` for FreeBSD.
(#[1447](https://github.com/nix-rust/nix/pull/1447))
- Added `IpFreebind` socket option (sockopt) on Linux, Fuchsia and Android.
(#[1456](https://github.com/nix-rust/nix/pull/1456))

### Changed
### Fixed
Expand Down
2 changes: 2 additions & 0 deletions src/sys/socket/sockopt.rs
Expand Up @@ -238,6 +238,8 @@ cfg_if! {
}
sockopt_impl!(Both, IpMulticastTtl, libc::IPPROTO_IP, libc::IP_MULTICAST_TTL, u8);
sockopt_impl!(Both, IpMulticastLoop, libc::IPPROTO_IP, libc::IP_MULTICAST_LOOP, bool);
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
sockopt_impl!(Both, IpFreebind, libc::IPPROTO_IP, libc::IP_FREEBIND, bool);
sockopt_impl!(Both, ReceiveTimeout, libc::SOL_SOCKET, libc::SO_RCVTIMEO, TimeVal);
sockopt_impl!(Both, SendTimeout, libc::SOL_SOCKET, libc::SO_SNDTIMEO, TimeVal);
sockopt_impl!(Both, Broadcast, libc::SOL_SOCKET, libc::SO_BROADCAST, bool);
Expand Down

0 comments on commit 58deca5

Please sign in to comment.