diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-01-02 16:17:55 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-01-07 10:28:35 +0100 |
| commit | dc64fb58a88918f751f3e26571bf0ef6f99fd722 (patch) | |
| tree | b7a0c6e05751c6b8dce4d6b3399e2c6d3fcc337a /talpid-core/src | |
| parent | 628d9a565db02986896b600659f555db441a3f3d (diff) | |
| download | mullvadvpn-dc64fb58a88918f751f3e26571bf0ef6f99fd722.tar.xz mullvadvpn-dc64fb58a88918f751f3e26571bf0ef6f99fd722.zip | |
Check if get_tap_interface_ipv6_status() fails due to missing TAP
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/winnet.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/talpid-core/src/winnet.rs b/talpid-core/src/winnet.rs index 24e30fabeb..08a4937b3c 100644 --- a/talpid-core/src/winnet.rs +++ b/talpid-core/src/winnet.rs @@ -64,6 +64,9 @@ pub fn ensure_top_metric_for_interface(interface_alias: &str) -> Result<bool, Er /// Checks if IPv6 is enabled for the TAP interface pub fn get_tap_interface_ipv6_status() -> Result<bool, Error> { + // WinNet_GetTapInterfaceIpv6Status() will fail if the alias cannot be retrieved. + // Try to retrieve it first so that we may return a more specific error. + let _ = get_tap_interface_alias()?; let tap_ipv6_status = unsafe { WinNet_GetTapInterfaceIpv6Status(Some(log_sink), logging_context()) }; |
