PeerProxy: Only add IPv4 DNS servers when excluding private IPs
Reported-By: Christophe-Marie Duquesne <chmd@chmd.fr> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
6d0fde218b
commit
fb4f1e30d5
@ -226,6 +226,7 @@ public class PeerProxy extends BaseObservable implements Parcelable {
|
||||
|
||||
private void setInterfaceDns(final CharSequence dnsServers) {
|
||||
final List<String> newDnsRoutes = Stream.of(Attribute.split(dnsServers))
|
||||
.filter(server -> !server.contains(":"))
|
||||
.map(server -> server + "/32")
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
if (allowedIpsState == AllowedIpsState.CONTAINS_IPV4_PUBLIC_NETWORKS) {
|
||||
|
Loading…
Reference in New Issue
Block a user