Skip to content

Commit 6f2ee6d

Browse files
committed
CLOUDSTACK-6485 prevent ipaddress asignment of gateway to gateway-interface on vpc router
1 parent 3fc781d commit 6f2ee6d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,18 @@ public VpcGatewayVO doInTransaction(TransactionStatus status) throws ResourceAll
16241624
networkAclId = aclId;
16251625
}
16261626

1627+
{ // experimental block, this is a hack
1628+
// set vpc id in network to null
1629+
// might be needed for all types of broadcast domains
1630+
// the ugly hack is that vpc gateway nets are created as guest network
1631+
// while they are not.
1632+
// A more permanent solution would be to define a type of 'gatewaynetwork'
1633+
// so that handling code is not mixed between the two
1634+
NetworkVO gatewaynet = _ntwkDao.findById(privateNtwk.getId());
1635+
gatewaynet.setVpcId(vpcId);
1636+
_ntwkDao.persist(gatewaynet);
1637+
}
1638+
16271639
//2) create gateway entry
16281640
VpcGatewayVO gatewayVO =
16291641
new VpcGatewayVO(ipAddress, VpcGateway.Type.Private, vpcId, privateNtwk.getDataCenterId(), privateNtwk.getId(), broadcastUri, gateway, netmask,

0 commit comments

Comments
 (0)