summaryrefslogtreecommitdiffhomepage
path: root/talpid-core
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2020-04-23 19:57:27 +0200
committerDavid Lönnhager <david.l@mullvad.net>2020-04-24 16:51:47 +0200
commit9dc0d2c19dd16d5a701682bf83a0580c729ba7a0 (patch)
tree18b72910fdf646d065eede1d68c7a908af426d9f /talpid-core
parent2eaa3845ef8e64208f30784575356f4137412133 (diff)
downloadmullvadvpn-9dc0d2c19dd16d5a701682bf83a0580c729ba7a0.tar.xz
mullvadvpn-9dc0d2c19dd16d5a701682bf83a0580c729ba7a0.zip
Remove dead code
Diffstat (limited to 'talpid-core')
-rw-r--r--talpid-core/src/tunnel/mod.rs27
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")]