summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2019-01-02 20:21:08 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-07 19:21:34 -0500
commit210e2f40a143d1512fcf82bb629ba30bfcd79eb7 (patch)
tree2f10291953e86ddecc9da1471a425c8038b5e28d
parenteb1f56ba841f57d4ab6956d84505c9cdc358d058 (diff)
PeerProxy: Only add IPv4 DNS servers when excluding private IPs
Reported-By: Christophe-Marie Duquesne <chmd@chmd.fr>
-rw-r--r--app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java b/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java
index 6336abab..06958124 100644
--- a/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java
+++ b/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java
@@ -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) {