Skip to content

Commit 7033d47

Browse files
Merge #1470
1470: Add the IPV6_V6ONLY sockopt r=asomers a=danieldulaney `IPV6_V6ONLY` allows the user to select between dual-stack and IPv6-only sockets. Platform support seems to be good; all platforms with IPv6 support seem to have this sockopt. Co-authored-by: Daniel Dulaney <[email protected]>
2 parents 7e9c0ed + 5d4f3c2 commit 7033d47

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
55

66
## [Unreleased] - ReleaseDate
77
### Added
8+
9+
- Added `IPV6_V6ONLY` sockopt.
10+
(#[1470](https://github.com/nix-rust/nix/pull/1470))
11+
812
### Changed
913

1014
- `FdSet::{contains, highest, fds}` no longer require a mutable reference.

src/sys/socket/sockopt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ sockopt_impl!(Both, UdpGsoSegment, libc::SOL_UDP, libc::UDP_SEGMENT, libc::c_int
330330
sockopt_impl!(Both, UdpGroSegment, libc::IPPROTO_UDP, libc::UDP_GRO, bool);
331331
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
332332
sockopt_impl!(Both, RxqOvfl, libc::SOL_SOCKET, libc::SO_RXQ_OVFL, libc::c_int);
333+
sockopt_impl!(Both, Ipv6V6Only, libc::IPPROTO_IPV6, libc::IPV6_V6ONLY, bool);
333334

334335
#[cfg(any(target_os = "android", target_os = "linux"))]
335336
#[derive(Copy, Clone, Debug)]

0 commit comments

Comments
 (0)