Do not do DNS lookups for IPs
This involves reflection, which is a bummer, but it's better than doing unnecessary DNS lookups. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -144,8 +144,6 @@ public class Peer extends BaseObservable implements Parcelable {
|
||||
public void addAllowedIPs(String[] allowedIPs) {
|
||||
if (allowedIPs != null && allowedIPs.length > 0) {
|
||||
for (final String allowedIP : allowedIPs) {
|
||||
if (allowedIP.isEmpty())
|
||||
throw new IllegalArgumentException("AllowedIP is empty");
|
||||
this.allowedIPsList.add(new IPCidr(allowedIP));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user