This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new c4ca420 CLOUDSTACK-8969: VPN customer gateway can't be registered
with hostname (#955)
c4ca420 is described below
commit c4ca420f66674fc0be42aa8075b6b9194ea2355c
Author: SudharmaJain <[email protected]>
AuthorDate: Wed Sep 13 10:29:08 2017 +0530
CLOUDSTACK-8969: VPN customer gateway can't be registered with hostname
(#955)
When we have VPN customer gateway which is resolved by a hostname , we
should be able to register the VPN customer gateway with its hostname instead
of the IP address, this would be useful in case where the remote device IP is
dynamically assigned , where customers use DDNS to resolve it.
---
server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
index e465bfb..ba8c1d1 100644
--- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
@@ -177,8 +177,8 @@ public class Site2SiteVpnManagerImpl extends ManagerBase
implements Site2SiteVpn
String name = cmd.getName();
String gatewayIp = cmd.getGatewayIp();
- if (!NetUtils.isValidIp(gatewayIp)) {
- throw new InvalidParameterValueException("The customer gateway ip
" + gatewayIp + " is invalid!");
+ if (!NetUtils.isValidIp(gatewayIp) &&
!NetUtils.verifyDomainName(gatewayIp)) {
+ throw new InvalidParameterValueException("The customer gateway
ip/Domain " + gatewayIp + " is invalid!");
}
if (name == null) {
name = "VPN-" + gatewayIp;
@@ -431,8 +431,8 @@ public class Site2SiteVpnManagerImpl extends ManagerBase
implements Site2SiteVpn
}
String name = cmd.getName();
String gatewayIp = cmd.getGatewayIp();
- if (!NetUtils.isValidIp(gatewayIp)) {
- throw new InvalidParameterValueException("The customer gateway ip
" + gatewayIp + " is invalid!");
+ if (!NetUtils.isValidIp(gatewayIp) &&
!NetUtils.verifyDomainName(gatewayIp)) {
+ throw new InvalidParameterValueException("The customer gateway
ip/Domain " + gatewayIp + " is invalid!");
}
if (name == null) {
name = "VPN-" + gatewayIp;
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].