REM:
1. 更新数据库保存IP格式
This commit is contained in:
HuangXin 2021-01-18 14:48:32 +08:00
parent 6ce7a6bdcd
commit 04cdb57e8f
1 changed files with 2 additions and 8 deletions

View File

@ -427,16 +427,10 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
// 将业务Ip根据IP地址类型进行拆分
for (String k : StringUtils.deleteWhitespace(v.getServiceIp()).split(DisposeConfigValue.SPLIT_CHAR)) {
String ipValue = k.replaceAll("\\d+_", "");
if (!k.contains(":")) {
if (Pattern.matches(ConstValue.ipAddrSegmentReg(), ipValue)) {
ipV4.add(ipV4Idx++ + "_" + ipValue);
}
ipV4.add(ipV4Idx++ + "_" + k);
} else {
if (Pattern.matches(ConstValue.ipAddrSegmentReg(), ipValue)) {
ipV6.add(ipV6Idx++ + "_" + ipValue);
}
ipV6.add(ipV6Idx++ + "_" + k);
}
}