Skip to content

Commit 4034f79

Browse files
committed
Fix bug in obfuscation resolver
1 parent 19896f5 commit 4034f79

File tree

1 file changed

+4
-3
lines changed
  • mullvad-relay-selector/src/relay_selector

1 file changed

+4
-3
lines changed

mullvad-relay-selector/src/relay_selector/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,9 +1151,10 @@ fn obfuscation_criteria(
11511151
Constraint::Only(IpVersion::V4) if has_ipv4 => IpVersionMatch::Ok,
11521152
Constraint::Only(IpVersion::V6) if has_ipv6 => IpVersionMatch::Ok,
11531153
// No match — report whether the *other* IP version is available.
1154-
Constraint::Any => IpVersionMatch::None,
1155-
Constraint::Only(IpVersion::V4) => IpVersionMatch::Other,
1156-
Constraint::Only(IpVersion::V6) => IpVersionMatch::Other,
1154+
Constraint::Only(IpVersion::V4) if has_ipv6 => IpVersionMatch::Other,
1155+
Constraint::Only(IpVersion::V6) if has_ipv4 => IpVersionMatch::Other,
1156+
// IP list was empty
1157+
_ => IpVersionMatch::None,
11571158
}
11581159
}
11591160

0 commit comments

Comments
 (0)