|
|
|
@ -843,10 +843,8 @@ public class yacySeed implements Cloneable, Comparable<yacySeed>, Comparator<yac
|
|
|
|
|
// returns null if ipString is proper, a string with the cause otherwise
|
|
|
|
|
if (ipString == null) return ipString + " -> IP is null";
|
|
|
|
|
if (ipString.length() > 0 && ipString.length() < 8) return ipString + " -> IP is too short: ";
|
|
|
|
|
InetAddress ip = Domains.dnsResolve(ipString);
|
|
|
|
|
if (ip == null) return ipString + " -> IP is not proper"; //this does not work with staticIP
|
|
|
|
|
if (Switchboard.getSwitchboard().isAllIPMode()) return null;
|
|
|
|
|
boolean islocal = Domains.isLocal(ip);
|
|
|
|
|
boolean islocal = Domains.isLocal(ipString);
|
|
|
|
|
if (islocal && Switchboard.getSwitchboard().isGlobalMode()) return ipString + " - local IP for global mode rejected";
|
|
|
|
|
if (!islocal && Switchboard.getSwitchboard().isIntranetMode()) return ipString + " - global IP for intranet mode rejected";
|
|
|
|
|
return null;
|
|
|
|
|