summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--mullvad-daemon/src/relays.rs5
2 files changed, 3 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d24cf0416..bd0ce98f83 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,8 @@ Line wrap the file at 100 chars. Th
## [Unreleased]
+### Fixed
+- Fix improved WireGuard port selection
## [2019.10-beta2] - 2019-12-05
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs
index 677dcb6da1..51937e9ecf 100644
--- a/mullvad-daemon/src/relays.rs
+++ b/mullvad-daemon/src/relays.rs
@@ -288,10 +288,7 @@ impl RelaySelector {
// This ensures that if after the first 2 failed attempts the daemon does not
// conenct, then afterwards 2 of each 4 successive attempts will try to connect on
// port 53.
- if retry_attempt > 2
- && retry_attempt % 4 < 2
- && relay_constraints.wireguard_constraints.port.is_any()
- {
+ if retry_attempt % 4 > 1 && relay_constraints.wireguard_constraints.port.is_any() {
relay_constraints.wireguard_constraints.port = Constraint::Only(53);
}
}