Merge remote-tracking branch 'origin/v2.0.5_dev' into v2.0.5_dev

This commit is contained in:
HuangXin 2021-01-19 10:20:27 +08:00
commit e8937bfd44
1 changed files with 6 additions and 3 deletions

View File

@ -104,7 +104,8 @@ public class DisposeTaskController {
String endTime = String.valueOf(req.getDisposeTime() == -1 ? 5256000: req.getDisposeTime()); String endTime = String.valueOf(req.getDisposeTime() == -1 ? 5256000: req.getDisposeTime());
NetflowDirection netDir = CommonEnumHandler.codeOf(NetflowDirection.class, NetflowDirection netDir = CommonEnumHandler.codeOf(NetflowDirection.class,
Optional.ofNullable(req.getFlowDirection()).orElse(2)); Optional.ofNullable(req.getFlowDirection()).orElse(2));
Long attackType = DDoSAttackType.getTypeMaskFromAttackType(new Integer[]{DDoSAttackType.RST_FLOOD.getValue()}); Long attackType = DDoSAttackType.getTypeMaskFromAttackType(Optional.ofNullable(req.getAttackType())
.orElse(new Integer[]{DDoSAttackType.NONE_ATTACKS.getValue()}));
Integer flowBand = Optional.ofNullable(req.getFlowBandwidth()) Integer flowBand = Optional.ofNullable(req.getFlowBandwidth())
.orElse(DisposeConfigValue.DEFAULT_DISPOSE_BANDWIDTH); .orElse(DisposeConfigValue.DEFAULT_DISPOSE_BANDWIDTH);
@ -184,7 +185,8 @@ public class DisposeTaskController {
Optional.ofNullable(req.getFlowDirection()) Optional.ofNullable(req.getFlowDirection())
.orElse(2))) .orElse(2)))
.attackType(DDoSAttackType.getTypeMaskFromAttackType( .attackType(DDoSAttackType.getTypeMaskFromAttackType(
new Integer[]{DDoSAttackType.RST_FLOOD.getValue()})) Optional.ofNullable(req.getAttackType())
.orElse(new Integer[]{DDoSAttackType.NONE_ATTACKS.getValue()})))
.flowBandWidth(Optional.ofNullable(req.getFlowBandwidth()) .flowBandWidth(Optional.ofNullable(req.getFlowBandwidth())
.orElse(DisposeConfigValue.DEFAULT_DISPOSE_BANDWIDTH)) .orElse(DisposeConfigValue.DEFAULT_DISPOSE_BANDWIDTH))
.build(); .build();
@ -234,7 +236,8 @@ public class DisposeTaskController {
String endTime = String.valueOf(req.getDisposeTime()); String endTime = String.valueOf(req.getDisposeTime());
NetflowDirection netDir = CommonEnumHandler.codeOf(NetflowDirection.class, NetflowDirection netDir = CommonEnumHandler.codeOf(NetflowDirection.class,
Optional.ofNullable(req.getFlowDirection()).orElse(2)); Optional.ofNullable(req.getFlowDirection()).orElse(2));
Long attackType = DDoSAttackType.getTypeMaskFromAttackType(new Integer[]{DDoSAttackType.RST_FLOOD.getValue()}); Long attackType = DDoSAttackType.getTypeMaskFromAttackType(Optional.ofNullable(req.getAttackType())
.orElse(new Integer[]{DDoSAttackType.NONE_ATTACKS.getValue()}));
Integer flowBand = Optional.ofNullable(req.getFlowBandwidth()) Integer flowBand = Optional.ofNullable(req.getFlowBandwidth())
.orElse(DisposeConfigValue.DEFAULT_DISPOSE_BANDWIDTH); .orElse(DisposeConfigValue.DEFAULT_DISPOSE_BANDWIDTH);