Skip to content

Commit c4f2273

Browse files
bors[bot]Icemicbearice
authored
Merge #1490
1490: add libc::IP6T_SO_ORIGINAL_DST to socket opt r=asomers a=bearice the original PR #1410 was stalled for a while let's make it happen. this should closes #1410 and #938 Co-authored-by: Icemic <[email protected]> Co-authored-by: Bearice Ren <[email protected]>
2 parents 5ed5bb6 + e6f972c commit c4f2273

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
@@ -24,6 +24,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2424
(#[1302](https://github.com/nix-rust/nix/pull/1302))
2525
- Added `ptrace::interrupt` method for platforms that support `PTRACE_INTERRUPT`
2626
(#[1422](https://github.com/nix-rust/nix/pull/1422))
27+
- Added `IP6T_SO_ORIGINAL_DST` sockopt.
28+
(#[1490](https://github.com/nix-rust/nix/pull/1490))
2729

2830
### Changed
2931

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ sockopt_impl!(GetOnly, AcceptConn, libc::SOL_SOCKET, libc::SO_ACCEPTCONN, bool);
283283
sockopt_impl!(Both, BindToDevice, libc::SOL_SOCKET, libc::SO_BINDTODEVICE, OsString<[u8; libc::IFNAMSIZ]>);
284284
#[cfg(any(target_os = "android", target_os = "linux"))]
285285
sockopt_impl!(GetOnly, OriginalDst, libc::SOL_IP, libc::SO_ORIGINAL_DST, libc::sockaddr_in);
286+
#[cfg(any(target_os = "android", target_os = "linux"))]
287+
sockopt_impl!(GetOnly, Ip6tOriginalDst, libc::SOL_IPV6, libc::IP6T_SO_ORIGINAL_DST, libc::sockaddr_in6);
286288
sockopt_impl!(Both, ReceiveTimestamp, libc::SOL_SOCKET, libc::SO_TIMESTAMP, bool);
287289
#[cfg(all(target_os = "linux"))]
288290
sockopt_impl!(Both, ReceiveTimestampns, libc::SOL_SOCKET, libc::SO_TIMESTAMPNS, bool);

0 commit comments

Comments
 (0)