Skip to content

Commit 16bf065

Browse files
committed
CLOUDSTACK-6485 prevent ipaddress asignment of gateway to gateway-interface on vpc router
1 parent 9fa9e3a commit 16bf065

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
@@ -1623,6 +1623,18 @@ public VpcGatewayVO doInTransaction(TransactionStatus status) throws ResourceAll
16231623
networkAclId = aclId;
16241624
}
16251625

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

0 commit comments

Comments
 (0)