Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rust/headless-client/src/dns_control/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use super::DnsController;
use anyhow::{Context as _, Result};
use firezone_bin_shared::platform::{DnsControlMethod, CREATE_NO_WINDOW, TUNNEL_UUID};
use firezone_logging::std_dyn_err;
use firezone_logging::{anyhow_dyn_err, std_dyn_err};
use std::{io, net::IpAddr, os::windows::process::CommandExt, path::Path, process::Command};
use windows::Win32::System::GroupPolicy::{RefreshPolicyEx, RP_FORCE};

Expand Down Expand Up @@ -125,7 +125,9 @@ fn activate(dns_config: &[IpAddr]) -> Result<()> {

let hklm = winreg::RegKey::predef(winreg::enums::HKEY_LOCAL_MACHINE);

set_nameservers_on_interface(dns_config).context("Failed to set nameservers")?;
if let Err(e) = set_nameservers_on_interface(dns_config) {
tracing::warn!(error = anyhow_dyn_err(&e), "Failed to explicitly set nameservers on tunnel interface; DNS resources in WSL may not work");
}

// e.g. [100.100.111.1, 100.100.111.2] -> "100.100.111.1;100.100.111.2"
let dns_config_string = itertools::join(dns_config, ";");
Expand Down
Loading