diff options
| -rw-r--r-- | talpid-core/src/tunnel/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/talpid-core/src/tunnel/mod.rs b/talpid-core/src/tunnel/mod.rs index 59f032b286..2969f8660d 100644 --- a/talpid-core/src/tunnel/mod.rs +++ b/talpid-core/src/tunnel/mod.rs @@ -324,11 +324,13 @@ fn is_ipv6_enabled_in_os() -> bool { const IPV6_DISABLED: u8 = 0xFF; - RegKey::predef(HKEY_LOCAL_MACHINE) + 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 & 0xFF) == IPV6_DISABLED as u32) - .unwrap_or(false) + .unwrap_or(false); + + globally_enabled && ::winnet::get_tap_interface_ipv6_status().unwrap_or(false) } #[cfg(target_os = "linux")] { |
