REM:
1. 修改业务IP和防护对象IP同步比较问题
This commit is contained in:
HuangXin 2021-01-20 17:20:31 +08:00
parent 8a91587ae2
commit 86b82556d4
1 changed files with 11 additions and 5 deletions

View File

@ -507,6 +507,8 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
// 判断防护IP段是否有变化 // 判断防护IP段是否有变化
if (IpAddrType.IPV4.equals(t)) { if (IpAddrType.IPV4.equals(t)) {
if (ipV4.size() != dp.getIpSegment().values().size()) { if (ipV4.size() != dp.getIpSegment().values().size()) {
upgradeIpSegment = true;
} else {
List<String> ipList = List<String> ipList =
ipV4.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList()); ipV4.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList());
@ -516,6 +518,9 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
} }
} }
} else if (IpAddrType.IPV6.equals(t)) { } else if (IpAddrType.IPV6.equals(t)) {
if (ipV6.size() != dp.getIpSegment().values().size()) {
upgradeIpSegment = true;
} else {
List<String> ipList = List<String> ipList =
ipV6.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList()); ipV6.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList());
@ -524,6 +529,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
upgradeIpSegment = true; upgradeIpSegment = true;
} }
} }
}
// 更新防护对象 // 更新防护对象
if (upgradeIpSegment) { if (upgradeIpSegment) {