File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
server/src/com/cloud/network/vpn Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,8 @@ public Site2SiteCustomerGateway createCustomerGateway(CreateVpnCustomerGatewayCm
179179
180180 String name = cmd .getName ();
181181 String gatewayIp = cmd .getGatewayIp ();
182- if (!NetUtils .isValidIp (gatewayIp )) {
183- throw new InvalidParameterValueException ("The customer gateway ip " + gatewayIp + " is invalid!" );
182+ if (!NetUtils .isValidIp (gatewayIp ) && ! NetUtils . verifyDomainName ( gatewayIp ) ) {
183+ throw new InvalidParameterValueException ("The customer gateway ip/Domain " + gatewayIp + " is invalid!" );
184184 }
185185 if (name == null ) {
186186 name = "VPN-" + gatewayIp ;
@@ -428,8 +428,8 @@ public Site2SiteCustomerGateway updateCustomerGateway(UpdateVpnCustomerGatewayCm
428428 }
429429 String name = cmd .getName ();
430430 String gatewayIp = cmd .getGatewayIp ();
431- if (!NetUtils .isValidIp (gatewayIp )) {
432- throw new InvalidParameterValueException ("The customer gateway ip " + gatewayIp + " is invalid!" );
431+ if (!NetUtils .isValidIp (gatewayIp ) && ! NetUtils . verifyDomainName ( gatewayIp ) ) {
432+ throw new InvalidParameterValueException ("The customer gateway ip/Domain " + gatewayIp + " is invalid!" );
433433 }
434434 if (name == null ) {
435435 name = "VPN-" + gatewayIp ;
You can’t perform that action at this time.
0 commit comments