parent
20c56c79ba
commit
3159e79124
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue