Skip to content

Commit

Permalink
Merge #1470
Browse files Browse the repository at this point in the history
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 <dulaney.daniel@gmail.com>
  • Loading branch information
bors[bot] and danieldulaney committed Jul 17, 2021
2 parents 7e9c0ed + 5d4f3c2 commit 7033d47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased] - ReleaseDate
### Added

- Added `IPV6_V6ONLY` sockopt.
(#[1470](https://github.com/nix-rust/nix/pull/1470))

### Changed

- `FdSet::{contains, highest, fds}` no longer require a mutable reference.
Expand Down
1 change: 1 addition & 0 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ sockopt_impl!(Both, UdpGsoSegment, libc::SOL_UDP, libc::UDP_SEGMENT, libc::c_int
sockopt_impl!(Both, UdpGroSegment, libc::IPPROTO_UDP, libc::UDP_GRO, bool);
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
sockopt_impl!(Both, RxqOvfl, libc::SOL_SOCKET, libc::SO_RXQ_OVFL, libc::c_int);
sockopt_impl!(Both, Ipv6V6Only, libc::IPPROTO_IPV6, libc::IPV6_V6ONLY, bool);

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

0 comments on commit 7033d47

Please sign in to comment.