diff options
| -rw-r--r-- | talpid-core/src/tunnel/mod.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/talpid-core/src/tunnel/mod.rs b/talpid-core/src/tunnel/mod.rs index afee640829..25d2c65515 100644 --- a/talpid-core/src/tunnel/mod.rs +++ b/talpid-core/src/tunnel/mod.rs @@ -370,33 +370,6 @@ fn try_enabling_ipv6(tunnel_parameters: &TunnelParameters) -> Result<()> { crate::winnet::enable_ipv6_for_adapter(&guid).map_err(Error::WinnetError) } -#[cfg(target_os = "windows")] -fn is_ipv6_enabled_in_os(check_tap: bool) -> Result<bool> { - use winreg::{enums::*, RegKey}; - - const IPV6_DISABLED_ON_TUNNELS_MASK: u32 = 0x01; - - // Check registry if IPv6 is disabled on tunnel interfaces, as documented in - // https://support.microsoft.com/en-us/help/929852/guidance-for-configuring-ipv6-in-windows-for-advanced-users - let globally_enabled = RegKey::predef(HKEY_LOCAL_MACHINE) - .open_subkey(r#"SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters"#) - .and_then(|ipv6_config| ipv6_config.get_value("DisabledComponents")) - .map(|ipv6_disabled_bits: u32| (ipv6_disabled_bits & IPV6_DISABLED_ON_TUNNELS_MASK) == 0) - .unwrap_or(true); - - if !globally_enabled { - log::debug!("IPv6 disabled in tunnel interfaces"); - } - - if check_tap { - let enabled_on_tap = - crate::winnet::get_tap_interface_ipv6_status().map_err(Error::WinnetError)?; - Ok(globally_enabled && enabled_on_tap) - } else { - Ok(globally_enabled) - } -} - #[cfg(not(target_os = "windows"))] fn is_ipv6_enabled_in_os() -> Result<bool> { #[cfg(target_os = "linux")] |
