wido commented on a change in pull request #3736: Add protocol number support 
for security group rules
URL: https://github.com/apache/cloudstack/pull/3736#discussion_r358277625
 
 

 ##########
 File path: scripts/vm/network/security_group.py
 ##########
 @@ -1032,7 +1032,18 @@ def add_network_rules(vm_name, vm_id, vm_ip, vm_ip6, 
signature, seqno, vmMac, ru
                 action = "ACCEPT"
                 direction = "-s"
 
-            range = str(start) + ':' + str(end)
+            if start == 0 and end == 0:
+                dport = ""
+            else:
+                dport = " --dport " + str(start) + ":" + str(end)
+
+            if protocol != 'all' and protocol != 'icmp' and protocol != 'tcp' 
and protocol != 'udp':
 
 Review comment:
   @rakgenius I'm aware, but underneath we translate ICMP to ICMPv6 when the 
CIDR/IP is an IPv6 adress. That's what we need to check.

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


With regards,
Apache Git Services

Reply via email to