Filter loopback and any local DNS addresses

This commit is contained in:
M66B 2016-02-21 19:43:39 +01:00
parent 6abf1a42ed
commit 256344c187
1 changed files with 2 additions and 1 deletions

View File

@ -871,7 +871,8 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
for (String def_dns : sysDns)
try {
InetAddress ddns = InetAddress.getByName(def_dns);
if (!listDns.contains(ddns))
if (!listDns.contains(ddns) &&
!(ddns.isLoopbackAddress() || ddns.isAnyLocalAddress()))
listDns.add(ddns);
} catch (Throwable ignored) {
}