diff options
| author | David Lönnhager <david.l@mullvad.net> | 2022-09-02 10:18:28 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2022-09-02 13:27:25 +0200 |
| commit | 6bba9ccb52710dfa4061566eb619e9efff33e9f3 (patch) | |
| tree | a4dc1071e7c66bd831de7f60b882564d68e21e0d | |
| parent | a490a86bf8bcfccb941c3a5088d5250f1301fba1 (diff) | |
| download | mullvadvpn-6bba9ccb52710dfa4061566eb619e9efff33e9f3.tar.xz mullvadvpn-6bba9ccb52710dfa4061566eb619e9efff33e9f3.zip | |
Swallow spurious 'failed to bypass socket' error
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index 770a231013..238cfb86b0 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -284,6 +284,8 @@ pub enum DaemonCommand { /// Saves the target tunnel state and enters a blocking state. The state is restored /// upon restart. PrepareRestart, + /// Causes a socket to bypass the tunnel. This has no effect when connected. It is only used + /// to bypass the tunnel in blocking states. #[cfg(target_os = "android")] BypassSocket(RawFd, oneshot::Sender<()>), } @@ -2164,7 +2166,10 @@ where fn on_bypass_socket(&mut self, fd: RawFd, tx: oneshot::Sender<()>) { match self.tunnel_state { // When connected, the API connection shouldn't be bypassed. - TunnelState::Connected { .. } => (), + TunnelState::Connected { .. } => { + log::trace!("Not bypassing connection because the tunnel is up"); + let _ = tx.send(()); + } _ => { self.send_tunnel_command(TunnelCommand::BypassSocket(fd, tx)); } |
