[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16245919#comment-16245919
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9961:
--------------------------------------------

rhtyd closed pull request #2157: CLOUDSTACK-9961: Fixed adding domain in vpn 
customer gateway
URL: https://github.com/apache/cloudstack/pull/2157
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java 
b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
index e465bfb3529..ba8c1d1ade0 100644
--- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
@@ -177,8 +177,8 @@ public Site2SiteCustomerGateway 
createCustomerGateway(CreateVpnCustomerGatewayCm
 
         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 Site2SiteCustomerGateway 
updateCustomerGateway(UpdateVpnCustomerGatewayCm
         }
         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;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Accept domain name for gateway while creating Vpncustomergateway
> ----------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9961
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9961
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: VPC
>    Affects Versions: 4.10.0.0
>            Reporter: DeepthiMachiraju
>              Labels: PVR
>             Fix For: 4.10.1.0
>
>
> Currently only IP address is supported for gateway while creating 
> Vpncustomergateway.  Add support for accepting domain name for gateway.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to