parent
8a91587ae2
commit
86b82556d4
|
@ -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,12 +518,16 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (IpAddrType.IPV6.equals(t)) {
|
} else if (IpAddrType.IPV6.equals(t)) {
|
||||||
List<String> ipList =
|
if (ipV6.size() != dp.getIpSegment().values().size()) {
|
||||||
ipV6.stream().map(k -> k.replaceAll("\\d+_", "")).collect(Collectors.toList());
|
|
||||||
|
|
||||||
if (!ipList.containsAll(dp.getIpSegment().values())
|
|
||||||
|| !dp.getIpSegment().values().containsAll(ipList)) {
|
|
||||||
upgradeIpSegment = true;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue