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