修改 导入时源IP/目的IP为默认值时提示语
This commit is contained in:
@@ -603,11 +603,11 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
Matcher ip4Matcher = ip4.matcher(srcIpAddress);
|
Matcher ip4Matcher = ip4.matcher(srcIpAddress);
|
||||||
Matcher ip6Matcher = ip6.matcher(srcIpAddress);
|
Matcher ip6Matcher = ip6.matcher(srcIpAddress);
|
||||||
if (ip4Matcher.matches() && srcIpAddress.startsWith("0.0.0.0")) {
|
if (ip4Matcher.matches() && srcIpAddress.startsWith("0.0.0.0")) {
|
||||||
errInfo.append(prop.getProperty("client_ip")
|
errInfo.append(prop.getProperty("client_ip")+" "
|
||||||
+ String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)
|
||||||
+ ";");
|
+ ";");
|
||||||
} else if (ip6Matcher.matches() && srcIpAddress.startsWith("::")) {
|
} else if (ip6Matcher.matches() && srcIpAddress.startsWith("::")) {
|
||||||
errInfo.append(prop.getProperty("client_ip")
|
errInfo.append(prop.getProperty("client_ip")+" "
|
||||||
+ String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)
|
||||||
+ ";");
|
+ ";");
|
||||||
}
|
}
|
||||||
@@ -631,11 +631,11 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
Matcher ip4Matcher = ip4.matcher(destIpAddress);
|
Matcher ip4Matcher = ip4.matcher(destIpAddress);
|
||||||
Matcher ip6Matcher = ip6.matcher(destIpAddress);
|
Matcher ip6Matcher = ip6.matcher(destIpAddress);
|
||||||
if (ip4Matcher.matches() && destIpAddress.startsWith("0.0.0.0")) {
|
if (ip4Matcher.matches() && destIpAddress.startsWith("0.0.0.0")) {
|
||||||
errInfo.append(prop.getProperty("server_ip")
|
errInfo.append(prop.getProperty("server_ip")+" "
|
||||||
+ String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)
|
||||||
+ ";");
|
+ ";");
|
||||||
} else if (ip6Matcher.matches() && destIpAddress.startsWith("::")) {
|
} else if (ip6Matcher.matches() && destIpAddress.startsWith("::")) {
|
||||||
errInfo.append(prop.getProperty("server_ip")
|
errInfo.append(prop.getProperty("server_ip")+" "
|
||||||
+ String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)
|
||||||
+ ";");
|
+ ";");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user