Skip to content

Commit 9844ba8

Browse files
Icemicbearice
authored andcommitted
feat: add libc::IP6T_SO_ORIGINAL_DST support
1 parent 06b5d33 commit 9844ba8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)