From ed7bd0022e23352c8ec57bdd832b49451db88e73 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Mon, 12 May 2014 18:26:53 -0700 Subject: [PATCH] CLOUDSTACK-5501: Allow one vpn customer gateway with multiple connections This restriction was purposely avoid confusion of VPN setup, but later found too strictly and cause troubles for deployment. Removed after testing one customer gateway with multiple connections. --- .../src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java index 1d6ed22b416..a34aa6c7e81 100644 --- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java +++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java @@ -264,13 +264,9 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn } if (_vpnConnectionDao.findByVpnGatewayIdAndCustomerGatewayId(vpnGatewayId, customerGatewayId) != null) { - throw new InvalidParameterValueException("The vpn connection with customer gateway id " + customerGatewayId + " or vpn gateway id " + vpnGatewayId + + throw new InvalidParameterValueException("The vpn connection with customer gateway id " + customerGatewayId + " and vpn gateway id " + vpnGatewayId + " already existed!"); } - if (_vpnConnectionDao.findByCustomerGatewayId(customerGatewayId) != null) { - throw new InvalidParameterValueException("The vpn connection with specified customer gateway id " + customerGatewayId + " already exists!"); - } - String[] cidrList = customerGateway.getGuestCidrList().split(","); // Remote sub nets cannot overlap VPC's sub net