summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-09-06 10:55:14 +0200
committerLinus Färnstrand <linus@mullvad.net>2018-09-06 10:55:14 +0200
commit4c23ea3825672552045e0b41c08fe35ccf234cbd (patch)
tree65cc8c33d87bc19eb2e7f41da01bd91ad1586f25
parente23db8886e254bdf81ea8cec612bd8b825e03495 (diff)
parent0216e1ad4b4b0a4dd415e9e897e9fd279f740589 (diff)
downloadmullvadvpn-4c23ea3825672552045e0b41c08fe35ccf234cbd.tar.xz
mullvadvpn-4c23ea3825672552045e0b41c08fe35ccf234cbd.zip
Merge branch 'fix-specific-server-selection'
-rw-r--r--mullvad-daemon/src/relays.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs
index fea9bd8340..ff49e97c6e 100644
--- a/mullvad-daemon/src/relays.rs
+++ b/mullvad-daemon/src/relays.rs
@@ -262,12 +262,11 @@ impl RelaySelector {
})
}
Constraint::Only(LocationConstraint::Hostname(ref country, ref city, ref hostname)) => {
- relay
- .location
- .as_ref()
- .map_or(relay.hostname == *hostname, |loc| {
- loc.country_code == *country && loc.city_code == *city
- })
+ relay.location.as_ref().map_or(false, |loc| {
+ loc.country_code == *country
+ && loc.city_code == *city
+ && relay.hostname == *hostname
+ })
}
};
if !matches_location {