summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2023-02-20 15:19:10 +0100
committerDavid Lönnhager <david.l@mullvad.net>2023-02-22 14:05:17 +0100
commitc46e5a690322f896c03e4e9c2ac3024bb625141a (patch)
tree25353dfbfc0b602a656540e214fa841bc12ac093
parent854429ea602dbacda6def1d9cff768032ea7e955 (diff)
downloadmullvadvpn-c46e5a690322f896c03e4e9c2ac3024bb625141a.tar.xz
mullvadvpn-c46e5a690322f896c03e4e9c2ac3024bb625141a.zip
Use netlink for openvpn
-rw-r--r--talpid-openvpn/src/lib.rs7
-rw-r--r--talpid-openvpn/src/process/openvpn.rs13
2 files changed, 0 insertions, 20 deletions
diff --git a/talpid-openvpn/src/lib.rs b/talpid-openvpn/src/lib.rs
index 0e6c696f6d..0d56c746fa 100644
--- a/talpid-openvpn/src/lib.rs
+++ b/talpid-openvpn/src/lib.rs
@@ -100,11 +100,6 @@ pub enum Error {
#[error(display = "Failed to start OpenVPN")]
StartProcessError,
- /// The IP routing program was not found.
- #[cfg(target_os = "linux")]
- #[error(display = "The IP routing program `ip` was not found")]
- IpRouteNotFound(#[error(source)] which::Error),
-
/// The OpenVPN binary was not found.
#[error(display = "No OpenVPN binary found at {}", _0)]
OpenVpnNotFound(String),
@@ -690,8 +685,6 @@ impl<C: OpenVpnBuilder + Send + 'static> OpenVpnMonitor<C> {
if let Some(config) = Self::get_config_path(resource_dir) {
cmd.config(config);
}
- #[cfg(target_os = "linux")]
- cmd.iproute_bin(which::which("ip").map_err(Error::IpRouteNotFound)?);
cmd.remote(params.config.endpoint)
.user_pass(user_pass_file)
.tunnel_options(&params.options)
diff --git a/talpid-openvpn/src/process/openvpn.rs b/talpid-openvpn/src/process/openvpn.rs
index 6a62ee3171..bdce415756 100644
--- a/talpid-openvpn/src/process/openvpn.rs
+++ b/talpid-openvpn/src/process/openvpn.rs
@@ -64,7 +64,6 @@ pub struct OpenVpnCommand {
proxy_auth_path: Option<PathBuf>,
ca: Option<PathBuf>,
crl: Option<PathBuf>,
- iproute_bin: Option<OsString>,
plugin: Option<(PathBuf, Vec<String>)>,
log: Option<PathBuf>,
tunnel_options: net::openvpn::TunnelOptions,
@@ -88,7 +87,6 @@ impl OpenVpnCommand {
proxy_auth_path: None,
ca: None,
crl: None,
- iproute_bin: None,
plugin: None,
log: None,
tunnel_options: net::openvpn::TunnelOptions::default(),
@@ -146,12 +144,6 @@ impl OpenVpnCommand {
self
}
- /// Sets the path to the ip route command.
- pub fn iproute_bin(&mut self, iproute_bin: impl Into<OsString>) -> &mut Self {
- self.iproute_bin = Some(iproute_bin.into());
- self
- }
-
/// Sets a plugin and its arguments that OpenVPN will be started with.
pub fn plugin(&mut self, path: impl AsRef<Path>, args: Vec<String>) -> &mut Self {
self.plugin = Some((path.as_ref().to_path_buf(), args));
@@ -214,11 +206,6 @@ impl OpenVpnCommand {
args.extend(self.remote_arguments().iter().map(OsString::from));
args.extend(self.authentication_arguments());
- if let Some(ref iproute_bin) = self.iproute_bin {
- args.push(OsString::from("--iproute"));
- args.push(iproute_bin.clone());
- }
-
if let Some(ref ca) = self.ca {
args.push(OsString::from("--ca"));
args.push(OsString::from(ca.as_os_str()));