parent
20c56c79ba
commit
0e91b3a064
|
@ -275,7 +275,7 @@ public class DpTechAbilityImpl implements DisposeAbility {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Long toDeviceAttackType(Long ddosAttackTypeMask) {
|
public Long toDeviceAttackType(Long ddosAttackTypeMask) {
|
||||||
return DpTechAttackType.formDdosAttackTypeMaks(ddosAttackTypeMask);
|
return DpTechAttackType.getTypeMaskFromAttackType(new DpTechAttackType[] {DpTechAttackType.UDP_FLOOD});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
||||||
private final Hashtable<String, ServiceInfo> disposeServiceGroup = new Hashtable<>();
|
private final Hashtable<String, ServiceInfo> disposeServiceGroup = new Hashtable<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Obj prefix.
|
* The Object prefix.
|
||||||
*/
|
*/
|
||||||
private final String objectPrefix = "CMHI";
|
private final String objectPrefix = "CMHI";
|
||||||
/**
|
/**
|
||||||
|
@ -1026,4 +1026,15 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
||||||
|
|
||||||
return super.deviceReady();
|
return super.deviceReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To device attack type long.
|
||||||
|
*
|
||||||
|
* @param ddosAttackTypeMask the ddos attack type mask
|
||||||
|
* @return the long
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Long toDeviceAttackType(Long ddosAttackTypeMask) {
|
||||||
|
return DpTechAttackType.getTypeMaskFromAttackType(new DpTechAttackType[] {DpTechAttackType.AUTO_ATTACK_TYPE});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,8 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
|
||||||
deviceTaskManager.attackTypeStatusSetBit(deviceTask.getId(), NetflowDirection.DIRECTION_OUT,
|
deviceTaskManager.attackTypeStatusSetBit(deviceTask.getId(), NetflowDirection.DIRECTION_OUT,
|
||||||
attackType.getValue());
|
attackType.getValue());
|
||||||
|
|
||||||
log.info("DPTECH_UMC setup task {}, {} succeed: {}", attackType, NetflowDirection.DIRECTION_OUT, deviceTask);
|
log.info("DPTECH_UMC setup task {}, {} succeed: {}", attackType, NetflowDirection.DIRECTION_OUT,
|
||||||
|
deviceTask);
|
||||||
|
|
||||||
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0);
|
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0);
|
||||||
} else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) {
|
} else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) {
|
||||||
|
@ -184,7 +185,8 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
|
||||||
deviceTaskManager.attackTypeStatusSetBit(deviceTask.getId(), NetflowDirection.DIRECTION_IN,
|
deviceTaskManager.attackTypeStatusSetBit(deviceTask.getId(), NetflowDirection.DIRECTION_IN,
|
||||||
attackType.getValue());
|
attackType.getValue());
|
||||||
|
|
||||||
log.info("DPTECH_UMC setup task {}, {} succeed: {}", attackType, NetflowDirection.DIRECTION_IN, deviceTask);
|
log.info("DPTECH_UMC setup task {}, {} succeed: {}", attackType, NetflowDirection.DIRECTION_IN,
|
||||||
|
deviceTask);
|
||||||
|
|
||||||
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0);
|
deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0);
|
||||||
} else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) {
|
} else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) {
|
||||||
|
@ -482,9 +484,10 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
|
||||||
.forEach(d -> {
|
.forEach(d -> {
|
||||||
log.info("Add dispose task for device: {}", d.getDev());
|
log.info("Add dispose task for device: {}", d.getDev());
|
||||||
|
|
||||||
if (!deviceTaskManager.addDisposeDeviceTaskInfo(v.getId(), d.getDev().getId(),
|
if (!deviceTaskManager
|
||||||
d.getDb()
|
.addDisposeDeviceTaskInfo(v.getId(),
|
||||||
.toDeviceAttackType(v.getAttackType()))) {
|
d.getDev().getId(),
|
||||||
|
d.getDb().toDeviceAttackType(v.getAttackType()))) {
|
||||||
log.error("Add task {} to device {} error", v, d);
|
log.error("Add task {} to device {} error", v, d);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue