From fbaa4d9ab1b59ba4610fe273743872f35e7e9091 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 12 Jul 2018 02:08:46 +0200 Subject: Version bump Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/config/Peer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src/main') diff --git a/app/src/main/java/com/wireguard/config/Peer.java b/app/src/main/java/com/wireguard/config/Peer.java index 6e8d5a89..371072de 100644 --- a/app/src/main/java/com/wireguard/config/Peer.java +++ b/app/src/main/java/com/wireguard/config/Peer.java @@ -26,6 +26,8 @@ import java.util.HashSet; import java.util.List; import java.util.Locale; +import java9.lang.Iterables; + /** * Represents the configuration for a WireGuard peer (a [Peer] block). */ @@ -262,7 +264,7 @@ public class Peer { final boolean hasDefaultRouteModRFC1918 = ips.containsAll(DEFAULT_ROUTE_MOD_RFC1918_V4); if ((!hasDefaultRoute && !hasDefaultRouteModRFC1918) || numSiblings > 0) return; - ips.clear(); + Iterables.removeIf(ips, ip -> !ip.contains(":")); if (hasDefaultRoute) { ips.addAll(DEFAULT_ROUTE_MOD_RFC1918_V4); ips.addAll(interfaceDNSRoutes); -- cgit v1.2.3