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段是否有变化
if (IpAddrType.IPV4.equals(t)) {
if (ipV4.size() != dp.getIpSegment().values().size()) {
upgradeIpSegment = true;
} else {
List<String> ipList =
ipV4.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList());
@ -516,12 +518,16 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
}
}
} else if (IpAddrType.IPV6.equals(t)) {
List<String> ipList =
ipV6.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList());
if (!ipList.containsAll(dp.getIpSegment().values())
|| !dp.getIpSegment().values().containsAll(ipList)) {
if (ipV6.size() != dp.getIpSegment().values().size()) {
upgradeIpSegment = true;
} else {
List<String> ipList =
ipV6.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList());
if (!ipList.containsAll(dp.getIpSegment().values())
|| !dp.getIpSegment().values().containsAll(ipList)) {
upgradeIpSegment = true;
}
}
}