summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2024-03-15 23:39:00 +0100
committerDavid Lönnhager <david.l@mullvad.net>2024-03-18 18:58:15 +0100
commit027d3fc3ebae0d9ea6bc4256f8acdc95844addd1 (patch)
treee7addec89d8420e227155d017e28d4049c542253
parenta63dfe58b32e9d450c8a744abde08c33aed172e9 (diff)
downloadmullvadvpn-027d3fc3ebae0d9ea6bc4256f8acdc95844addd1.tar.xz
mullvadvpn-027d3fc3ebae0d9ea6bc4256f8acdc95844addd1.zip
Remove dead code for obtaining interface DNS map
-rw-r--r--talpid-core/src/dns/macos.rs18
-rw-r--r--talpid-core/src/dns/mod.rs7
2 files changed, 0 insertions, 25 deletions
diff --git a/talpid-core/src/dns/macos.rs b/talpid-core/src/dns/macos.rs
index 82deb1bd67..6e1ab88dfb 100644
--- a/talpid-core/src/dns/macos.rs
+++ b/talpid-core/src/dns/macos.rs
@@ -38,10 +38,6 @@ pub enum Error {
#[error("Failed to initialize dynamic store")]
DynamicStoreInitError,
- /// Failed to parse IP address from config string
- #[error("Failed to parse an IP address from a config string")]
- AddrParseError(String, String, AddrParseError),
-
/// Failed to obtain name for interface
#[error("Failed to obtain interface name")]
GetInterfaceNameError,
@@ -261,20 +257,6 @@ impl DnsSettings {
BTreeSet::from_iter(self.server_addresses())
}
- pub fn interface_config(&self, interface_path: &str) -> Result<Vec<IpAddr>> {
- let addresses = self
- .server_addresses()
- .into_iter()
- .map(|server_addr| {
- server_addr.parse().map_err(|err| {
- Error::AddrParseError(interface_path.to_string(), server_addr.clone(), err)
- })
- })
- .collect::<Result<Vec<IpAddr>>>()?;
-
- Ok(addresses)
- }
-
/// Parses a CFArray into a Rust vector of Rust strings, if the array contains CFString
/// instances only, otherwise `None` is returned.
fn parse_cf_array_to_strings(array: CFArray) -> Option<Vec<String>> {
diff --git a/talpid-core/src/dns/mod.rs b/talpid-core/src/dns/mod.rs
index 39660078c3..a8c9ec1708 100644
--- a/talpid-core/src/dns/mod.rs
+++ b/talpid-core/src/dns/mod.rs
@@ -53,13 +53,6 @@ impl DnsMonitor {
})
}
- /// Returns a map of interfaces and respective list of resolvers that don't contain our
- /// changes.
- #[cfg(target_os = "macos")]
- pub fn get_system_config(&self) -> Result<Option<(String, Vec<IpAddr>)>, Error> {
- self.inner.get_system_config()
- }
-
/// Set DNS to the given servers. And start monitoring the system for changes.
pub fn set(&mut self, interface: &str, servers: &[IpAddr]) -> Result<(), Error> {
log::info!(