(1)更改IP验证选择相关属性的选择方式,去掉各种parents

(2)ip range 限制C网段,并且网络位必须相同
(3)IPSEC协议调整,ESP,AH加入字典
This commit is contained in:
wangxin
2018-10-15 19:17:55 +08:00
parent 7eb2c88858
commit 79071fd6a6
10 changed files with 103 additions and 128 deletions

View File

@@ -136,11 +136,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
ipCfgDao.saveCfgIndex(entity);
if(entity.getIpPortList()!=null){
for(IpPortCfg cfg:entity.getIpPortList()){
if(Constants.IPSEC_PROTOCOL.intValue()==cfg.getProtocol().intValue()) {
BeanUtils.copyProperties(entity, cfg,new String[]{"userRegion1","cfgRegionCode","cfgType"});
}else {
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
}
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
ipCfgDao.saveIpPortCfg(cfg);
}
}
@@ -176,11 +172,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
entity.setCreatorId(entity.getCurrentUser().getId());
if(entity.getIpPortList()!=null){
for(IpPortCfg cfg:entity.getIpPortList()){
if(Constants.IPSEC_PROTOCOL.intValue()==cfg.getProtocol().intValue()) {
BeanUtils.copyProperties(entity, cfg,new String[]{"userRegion1","cfgRegionCode","cfgType"});
}else {
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
}
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
ipCfgDao.saveIpPortCfg(cfg);
}
}
@@ -567,11 +559,6 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
ipCfgDao.auditCfg(cfg);
}
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
for(IpPortCfg cfg:entity.getIpPortList()) {
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
cfg.setProtocol(Integer.parseInt(cfg.getUserRegion1()));
}
}
Map<String,List> map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
groupRelationList=map.get("groupList");
ipRegionList=map.get("dstList");
@@ -610,10 +597,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
Integer ipsecProtocol=null;
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
ipsecProtocol=Integer.parseInt(cfg.getUserRegion1());
}
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","cfgId"});
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
if(ipsecProtocol!=null) {
ip.setProtocol(ipsecProtocol);
@@ -677,10 +661,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
Integer ipsecProtocol=null;
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
ipsecProtocol=Integer.parseInt(cfg.getUserRegion1());
}
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","cfgId"});
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
if(ipsecProtocol!=null) {
ip.setProtocol(ipsecProtocol);