Skip to content

Commit 2e0abcc

Browse files
author
Jayapal
committed
CLOUDSTACK-2952 Fixed configuring private gateway with another vpc acl id
1 parent 03d1346 commit 2e0abcc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

server/src/com/cloud/network/vpc/VpcManagerImpl.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,9 +1385,14 @@ public PrivateGateway createVpcPrivateGateway(long vpcId, Long physicalNetworkId
13851385

13861386
long networkAclId = NetworkACL.DEFAULT_DENY;
13871387
if (aclId != null) {
1388-
if ( _networkAclDao.findById(aclId) == null) {
1388+
NetworkACLVO aclVO = _networkAclDao.findById(aclId);
1389+
if ( aclVO == null) {
13891390
throw new InvalidParameterValueException("Invalid network acl id passed ");
13901391
}
1392+
if (aclVO.getVpcId() != vpcId ) {
1393+
throw new InvalidParameterValueException("Private gateway and network acl are not in the same vpc");
1394+
}
1395+
13911396
networkAclId = aclId;
13921397
}
13931398

0 commit comments

Comments
 (0)