配置导入加入对drop action的ICMP协议的判断
This commit is contained in:
@@ -686,12 +686,19 @@ public class BaseController {
|
|||||||
List<SysDataDictionaryItem> ipsecProrocolList = DictUtils.getDictList("IPSEC_PROTOCOL");
|
List<SysDataDictionaryItem> ipsecProrocolList = DictUtils.getDictList("IPSEC_PROTOCOL");
|
||||||
List<SysDataDictionaryItem> tunnelProrocolList = DictUtils.getDictList("TUNNEL_PROTOCOL");
|
List<SysDataDictionaryItem> tunnelProrocolList = DictUtils.getDictList("TUNNEL_PROTOCOL");
|
||||||
List<SysDataDictionaryItem> specialFunctionIdList = DictUtils.getDictList("SPECIAL_FUNCTION_ID");
|
List<SysDataDictionaryItem> specialFunctionIdList = DictUtils.getDictList("SPECIAL_FUNCTION_ID");
|
||||||
|
List<SysDataDictionaryItem> irTypeList = DictUtils.getDictList("IR_TYPE");
|
||||||
String specialItem=null;
|
String specialItem=null;
|
||||||
for(SysDataDictionaryItem sfuncItem:specialFunctionIdList){
|
for(SysDataDictionaryItem sfuncItem:specialFunctionIdList){
|
||||||
if(functionId==Integer.parseInt(sfuncItem.getItemCode())){
|
if(functionId==Integer.parseInt(sfuncItem.getItemCode())){
|
||||||
specialItem=sfuncItem.getItemValue();
|
specialItem=sfuncItem.getItemValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if("ipaddr".equals(specialItem)){
|
||||||
|
List<SysDataDictionaryItem> icmpprotocolList = DictUtils.getDictList("ICMP_PROTOCOL");
|
||||||
|
if(action==Constants.DROP_ACTION) {
|
||||||
|
protocolList.addAll(icmpprotocolList);
|
||||||
|
}
|
||||||
|
}
|
||||||
StringBuffer msg=new StringBuffer();
|
StringBuffer msg=new StringBuffer();
|
||||||
int line=1;
|
int line=1;
|
||||||
for(IpCfgTemplate value:list){
|
for(IpCfgTemplate value:list){
|
||||||
@@ -1000,7 +1007,6 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
//group and ir_type check start
|
//group and ir_type check start
|
||||||
if("ipmulitiplex".equals(specialItem)) {
|
if("ipmulitiplex".equals(specialItem)) {
|
||||||
List<SysDataDictionaryItem> irTypeList = DictUtils.getDictList("IR_TYPE");
|
|
||||||
Integer irType= value.getIrType();
|
Integer irType= value.getIrType();
|
||||||
if(irType==null) {
|
if(irType==null) {
|
||||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("ir_type"))+";");
|
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("ir_type"))+";");
|
||||||
|
|||||||
@@ -104,6 +104,10 @@ public class IpController extends CommonController{
|
|||||||
this._importIp(cfgName,redirectAttributes, file,cfg,TunnelIpTemplate.class);
|
this._importIp(cfgName,redirectAttributes, file,cfg,TunnelIpTemplate.class);
|
||||||
}else if("ipsec".equals(specialFunctionId)) {
|
}else if("ipsec".equals(specialFunctionId)) {
|
||||||
this._importIp(cfgName,redirectAttributes, file,cfg,IpsecTemplate.class);
|
this._importIp(cfgName,redirectAttributes, file,cfg,IpsecTemplate.class);
|
||||||
|
}else if("ipaddr".equals(specialFunctionId)) {
|
||||||
|
this._importIp(cfgName,redirectAttributes, file,cfg,IpAddrTemplate.class);
|
||||||
|
}else {
|
||||||
|
this._importIp(cfgName,redirectAttributes, file,cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -127,6 +131,10 @@ public class IpController extends CommonController{
|
|||||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,TunnelIpTemplate.class);
|
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,TunnelIpTemplate.class);
|
||||||
}else if("ipsec".equals(specialFunctionId)) {
|
}else if("ipsec".equals(specialFunctionId)) {
|
||||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,IpsecTemplate.class);
|
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,IpsecTemplate.class);
|
||||||
|
}else if("ipaddr".equals(specialFunctionId)) {
|
||||||
|
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,IpAddrTemplate.class);
|
||||||
|
}else {
|
||||||
|
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//ip配置导出
|
//ip配置导出
|
||||||
|
|||||||
Reference in New Issue
Block a user