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
commitfb4f1e30d55b91e031a1b206dafa2687b9f2d522 (patch)
tree2f10291953e86ddecc9da1471a425c8038b5e28d
parent6d0fde218b68cae3ed8f31118232b3f708d62deb (diff)
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>
-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) {