Skip to content

Commit

Permalink
Bump version 0.7.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Sep 27, 2024
1 parent c2df7a4 commit d53f6c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wintun-bindings"
version = "0.7.8"
version = "0.7.9"
edition = "2021"
authors = [
"ssrlive",
Expand Down
6 changes: 3 additions & 3 deletions src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ impl Adapter {
/// Sets the DNS servers for this adapter
pub fn set_dns_servers(&self, dns_servers: &[IpAddr]) -> Result<(), Error> {
let interface = GUID::from_u128(self.get_guid());
if let Err(err) = util::set_interface_dns_servers(interface, dns_servers) {
log::error!("Failed to set DNS servers in first attempt: {}", err);
util::set_adapter_dns_servers(&self.get_name()?, dns_servers)?;
if let Err(e) = util::set_interface_dns_servers(interface, dns_servers) {
log::debug!("Failed to set DNS servers in first attempt: \"{}\", try another...", e);
util::set_interface_dns_servers_via_cmd(&self.get_name()?, dns_servers)?;
}
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub(crate) fn set_interface_dns_servers(interface: GUID, dns: &[IpAddr]) -> crat
}
}

pub(crate) fn set_adapter_dns_servers(adapter: &str, dns: &[IpAddr]) -> crate::Result<()> {
pub(crate) fn set_interface_dns_servers_via_cmd(adapter: &str, dns: &[IpAddr]) -> crate::Result<()> {
if dns.is_empty() {
return Ok(());
}
Expand Down

0 comments on commit d53f6c3

Please sign in to comment.