diff --git a/crates/net/nat/src/net_if.rs b/crates/net/nat/src/net_if.rs index d93dd8dd5..c16af788d 100644 --- a/crates/net/nat/src/net_if.rs +++ b/crates/net/nat/src/net_if.rs @@ -1,7 +1,5 @@ //! IP resolution on non-host Docker network. -#![cfg(not(target_os = "windows"))] - use std::{io, net::IpAddr}; /// The 'eth0' interface tends to be the default interface that docker containers use to @@ -20,7 +18,6 @@ pub enum NetInterfaceError { } /// Reads IP of OS interface with given name, if exists. -#[cfg(not(target_os = "windows"))] pub fn resolve_net_if_ip(if_name: &str) -> Result { match if_addrs::get_if_addrs() { Ok(ifs) => { diff --git a/crates/node/core/src/args/network.rs b/crates/node/core/src/args/network.rs index b033be4ac..650a3dcb0 100644 --- a/crates/node/core/src/args/network.rs +++ b/crates/node/core/src/args/network.rs @@ -153,7 +153,6 @@ pub struct NetworkArgs { /// Name of network interface used to communicate with peers. /// /// If flag is set, but no value is passed, the default interface for docker `eth0` is tried. - #[cfg(not(target_os = "windows"))] #[arg(long = "net-if.experimental", conflicts_with = "addr", value_name = "IF_NAME")] pub net_if: Option, } @@ -161,7 +160,6 @@ pub struct NetworkArgs { impl NetworkArgs { /// Returns the resolved IP address. pub fn resolved_addr(&self) -> IpAddr { - #[cfg(not(target_os = "windows"))] if let Some(ref if_name) = self.net_if { let if_name = if if_name.is_empty() { DEFAULT_NET_IF_NAME } else { if_name }; return match reth_net_nat::net_if::resolve_net_if_ip(if_name) {