Skip to content

Commit dcc8628

Browse files
committed
Add original_dst to more distos
Signed-off-by: Keith Mattix II <[email protected]>
1 parent f4c57a8 commit dcc8628

File tree

1 file changed

+50
-4
lines changed

1 file changed

+50
-4
lines changed

src/socket.rs

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,13 +2257,33 @@ impl Socket {
22572257
/// redirected using `iptables` `REDIRECT` or `TPROXY`.
22582258
#[cfg(all(
22592259
feature = "all",
2260-
any(target_os = "android", target_os = "fuchsia", target_os = "linux")
2260+
any(
2261+
target_os = "android",
2262+
target_os = "dragonfly",
2263+
target_os = "freebsd",
2264+
target_os = "fuchsia",
2265+
target_os = "hurd",
2266+
target_os = "illumos",
2267+
target_os = "linux",
2268+
target_os = "netbsd",
2269+
target_os = "openbsd",
2270+
)
22612271
))]
22622272
#[cfg_attr(
22632273
docsrs,
22642274
doc(cfg(all(
22652275
feature = "all",
2266-
any(target_os = "android", target_os = "fuchsia", target_os = "linux")
2276+
any(
2277+
target_os = "android",
2278+
target_os = "dragonfly",
2279+
target_os = "freebsd",
2280+
target_os = "fuchsia",
2281+
target_os = "hurd",
2282+
target_os = "illumos",
2283+
target_os = "linux",
2284+
target_os = "netbsd",
2285+
target_os = "openbsd",
2286+
)
22672287
)))
22682288
)]
22692289
pub fn original_dst(&self) -> io::Result<SockAddr> {
@@ -2286,10 +2306,36 @@ impl Socket {
22862306
///
22872307
/// This value contains the original destination IPv6 address of the connection
22882308
/// redirected using `ip6tables` `REDIRECT` or `TPROXY`.
2289-
#[cfg(all(feature = "all", any(target_os = "android", target_os = "linux")))]
2309+
#[cfg(all(
2310+
feature = "all",
2311+
any(
2312+
target_os = "android",
2313+
target_os = "dragonfly",
2314+
target_os = "freebsd",
2315+
target_os = "fuchsia",
2316+
target_os = "hurd",
2317+
target_os = "illumos",
2318+
target_os = "linux",
2319+
target_os = "netbsd",
2320+
target_os = "openbsd",
2321+
)
2322+
))]
22902323
#[cfg_attr(
22912324
docsrs,
2292-
doc(cfg(all(feature = "all", any(target_os = "android", target_os = "linux"))))
2325+
doc(cfg(all(
2326+
feature = "all",
2327+
any(
2328+
target_os = "android",
2329+
target_os = "dragonfly",
2330+
target_os = "freebsd",
2331+
target_os = "fuchsia",
2332+
target_os = "hurd",
2333+
target_os = "illumos",
2334+
target_os = "linux",
2335+
target_os = "netbsd",
2336+
target_os = "openbsd",
2337+
)
2338+
)))
22932339
)]
22942340
pub fn original_dst_ipv6(&self) -> io::Result<SockAddr> {
22952341
// Safety: `getsockopt` initialises the `SockAddr` for us.

0 commit comments

Comments
 (0)