I am using compile 'de.measite.minidns:minidns-hla:0.2.2'
In DNSClient.java the function findDNS iterates through the blacklisted servers to remove them then returns the original array containing the blacklisted servers so it is not possible to blacklist servers:
public static synchronized String[] findDNS() {
String[] resArray = null;
for (DNSServerLookupMechanism mechanism : LOOKUP_MECHANISMS) {
resArray = mechanism.getDnsServerAddresses();
if (resArray == null) {
continue;
}
List<String> res = new ArrayList<>(Arrays.asList(resArray));
Iterator<String> it = res.iterator();
while (it.hasNext()) {
String potentialDnsServer = it.next();
if (blacklistedDnsServers.contains(potentialDnsServer)) {
LOGGER.fine("The DNS server lookup mechanism '" + mechanism.getName()
+ "' returned a blacklisted result: '" + potentialDnsServer + "'");
it.remove();
}
}
if (!res.isEmpty()) {
break;
}
}
return resArray;
}
The latest code on Github looks good and returns res but the 0.2.2 code is as above.
I am using compile 'de.measite.minidns:minidns-hla:0.2.2'
In DNSClient.java the function findDNS iterates through the blacklisted servers to remove them then returns the original array containing the blacklisted servers so it is not possible to blacklist servers:
public static synchronized String[] findDNS() { String[] resArray = null; for (DNSServerLookupMechanism mechanism : LOOKUP_MECHANISMS) { resArray = mechanism.getDnsServerAddresses(); if (resArray == null) { continue; }
The latest code on Github looks good and returns res but the 0.2.2 code is as above.