cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] wido commented on a change in pull request #3736: Add protocol number support for security group rules
Date Tue, 03 Dec 2019 10:26:36 GMT
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_r353095147
 
 

 ##########
 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:
   For ip6tables it's not 'icmp' which is used for the protocol, it's icmpv6, so don't we
need to add a check there?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message