Merge pull request #1299 from remibergsma/CLOUDSTACK-6485

CLOUDSTACK-6485 prevent ip asignment of private gw ifacePrevent ipaddress asignment of gateway to gateway-interface on vpc router by setting vpcid to null in network. This was fixed in 4.4 by 1f209ff226a24979cf3a43ce0c02e05c84dd4dc2, reimplemented for 4.7

* pr/1299:
  CLOUDSTACK-6485 prevent ip asignment of private gw iface

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2016-01-16 19:42:17 +01:00
commit 317c28a7e5

View File

@ -1668,7 +1668,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
// A more permanent solution would be to define a type of 'gatewaynetwork' // A more permanent solution would be to define a type of 'gatewaynetwork'
// so that handling code is not mixed between the two // so that handling code is not mixed between the two
final NetworkVO gatewaynet = _ntwkDao.findById(privateNtwk.getId()); final NetworkVO gatewaynet = _ntwkDao.findById(privateNtwk.getId());
gatewaynet.setVpcId(vpcId); gatewaynet.setVpcId(null);
_ntwkDao.persist(gatewaynet); _ntwkDao.persist(gatewaynet);
} }