cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaya...@apache.org
Subject git commit: updated refs/heads/4.3-forward to 7a71cf3
Date Thu, 06 Feb 2014 12:47:38 GMT
Updated Branches:
  refs/heads/4.3-forward bba6b7717 -> 7a71cf33c


CLOUDSTACK-6040: Updated the ip addr validation in create port forwarding


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7a71cf33
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7a71cf33
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7a71cf33

Branch: refs/heads/4.3-forward
Commit: 7a71cf33ce103392914ac51cd4689a6f5a340d0a
Parents: bba6b77
Author: Jayapal <jayapal@apache.org>
Authored: Thu Feb 6 17:58:26 2014 +0530
Committer: Jayapal <jayapal@apache.org>
Committed: Thu Feb 6 18:04:20 2014 +0530

----------------------------------------------------------------------
 .../api/command/user/firewall/CreatePortForwardingRuleCmd.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a71cf33/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
b/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
index ff63d08..2e8f662 100644
--- a/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.firewall;
 
 import java.util.List;
 
+import com.cloud.utils.net.NetUtils;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
@@ -317,7 +318,7 @@ public class CreatePortForwardingRuleCmd extends BaseAsyncCreateCmd implements
P
 
         Ip privateIp = getVmSecondaryIp();
         if (privateIp != null) {
-            if ( !privateIp.isIp4()) {
+            if (!NetUtils.isValidIp(privateIp.toString())) {
                 throw new InvalidParameterValueException("Invalid vm ip address");
             }
         }


Mime
View raw message