Skip to content

Commit 58deca5

Browse files
bors[bot]nox
andauthored
Merge #1456
1456: Add IpFreebind socket option r=asomers a=nox Co-authored-by: Anthony Ramine <nox@nox.paris>
2 parents 7317e0a + c916e52 commit 58deca5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
88
- Added `if_nameindex` (#[1445](https://github.com/nix-rust/nix/pull/1445))
99
- Added `nmount` for FreeBSD.
1010
(#[1447](https://github.com/nix-rust/nix/pull/1447))
11+
- Added `IpFreebind` socket option (sockopt) on Linux, Fuchsia and Android.
12+
(#[1456](https://github.com/nix-rust/nix/pull/1456))
1113

1214
### Changed
1315
### Fixed

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ cfg_if! {
238238
}
239239
sockopt_impl!(Both, IpMulticastTtl, libc::IPPROTO_IP, libc::IP_MULTICAST_TTL, u8);
240240
sockopt_impl!(Both, IpMulticastLoop, libc::IPPROTO_IP, libc::IP_MULTICAST_LOOP, bool);
241+
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
242+
sockopt_impl!(Both, IpFreebind, libc::IPPROTO_IP, libc::IP_FREEBIND, bool);
241243
sockopt_impl!(Both, ReceiveTimeout, libc::SOL_SOCKET, libc::SO_RCVTIMEO, TimeVal);
242244
sockopt_impl!(Both, SendTimeout, libc::SOL_SOCKET, libc::SO_SNDTIMEO, TimeVal);
243245
sockopt_impl!(Both, Broadcast, libc::SOL_SOCKET, libc::SO_BROADCAST, bool);

0 commit comments

Comments
 (0)