diff options
| -rw-r--r-- | mullvad-jni/src/talpid_vpn_service.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mullvad-jni/src/talpid_vpn_service.rs b/mullvad-jni/src/talpid_vpn_service.rs index 89759ca69e..a192444e7b 100644 --- a/mullvad-jni/src/talpid_vpn_service.rs +++ b/mullvad-jni/src/talpid_vpn_service.rs @@ -107,8 +107,8 @@ fn try_sending_random_udp(is_ipv6_enabled: bool) -> Result<(), SendRandomDataErr let socket = UdpSocket::bind(bound_addr).map_err(SendRandomDataError::BindUdpSocket)?; match socket.send_to(&random_data(), random_public_addr) { Ok(_) => return Ok(()), - // TODO: This condition looks wrong, but it's the same as in the original code - Err(_) if tried_ipv6 => continue, + // Always retry on IPv6 errors + Err(_) if random_public_addr.ip().is_ipv6() => continue, Err(_err) if matches!(_err.raw_os_error(), Some(22) | Some(101)) => { // Error code 101 - specified network is unreachable // Error code 22 - specified address is not usable |
