diff options
| author | Bug Magnet <marco.nikic@mullvad.net> | 2025-09-04 13:10:14 +0200 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2025-09-04 13:15:53 +0200 |
| commit | 411b63e3cd694cea2bbac2f2eaece51eec793a94 (patch) | |
| tree | 254375dabc610ab44facca714d9d6619e993f371 | |
| parent | 956f87e1ce5d62579a3abb0418e1d36f96d06004 (diff) | |
| download | mullvadvpn-411b63e3cd694cea2bbac2f2eaece51eec793a94.tar.xz mullvadvpn-411b63e3cd694cea2bbac2f2eaece51eec793a94.zip | |
Guarantee the QUIC UDP socket is non blocking
| -rw-r--r-- | tunnel-obfuscation/src/quic.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tunnel-obfuscation/src/quic.rs b/tunnel-obfuscation/src/quic.rs index c966bf7d12..7cd4fcc305 100644 --- a/tunnel-obfuscation/src/quic.rs +++ b/tunnel-obfuscation/src/quic.rs @@ -151,6 +151,10 @@ impl Quic { socket.set_mark(fwmark).map_err(Error::Fwmark)?; } + // The caller is responsible for ensuring that the socket is in non-blocking mode + // when calling UdpSocket::from_std + socket.set_nonblocking(true).map_err(Error::BindError)?; + UdpSocket::from_std(std::net::UdpSocket::from(socket)).map_err(Error::BindError)? }; |
