diff options
| author | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-06-12 14:13:58 +0200 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-06-12 15:41:13 +0200 |
| commit | b39d040d9f28cc06265f02c2bcf3910eb43d2ab9 (patch) | |
| tree | db801eca5f18defed3246cd0dfe1c522cd7b3abe /talpid-core/src | |
| parent | f0efcc68cfc310f6965443c28fbbf59455187165 (diff) | |
| download | mullvadvpn-b39d040d9f28cc06265f02c2bcf3910eb43d2ab9.tar.xz mullvadvpn-b39d040d9f28cc06265f02c2bcf3910eb43d2ab9.zip | |
Fix tun file descriptor ownership
We accidentally borrowed the file descriptor when we should have moved
it. This commit adds more `OwnedFd` and friends to help handle
ownership correctly.
Signed-off-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/talpid-core/src/tunnel_state_machine/mod.rs b/talpid-core/src/tunnel_state_machine/mod.rs index 207291360c..059edd417d 100644 --- a/talpid-core/src/tunnel_state_machine/mod.rs +++ b/talpid-core/src/tunnel_state_machine/mod.rs @@ -604,7 +604,7 @@ impl SharedTunnelStateValues { #[cfg(target_os = "android")] pub fn bypass_socket(&mut self, fd: RawFd, tx: oneshot::Sender<()>) { - if let Err(err) = self.tun_provider.lock().unwrap().bypass(fd) { + if let Err(err) = self.tun_provider.lock().unwrap().bypass(&fd) { log::error!("Failed to bypass socket {}", err); } let _ = tx.send(()); |
