rakgenius 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_r353117100
 
 

 ##########
 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:
   In the UI, we only have options for "TCP", "UDP", "ICMP" and "ALL". There is 
no option for "ICMPv6" in UI. Once this is added in ui, we can have that check 
here as well.

----------------------------------------------------------------
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