mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-8650: Fix securitygroups ingress FW for protocol any and 0.0.0.0/0
Change way 0.0.0.0/0 + all is handles, as per feedback in Slack channel Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
This commit is contained in:
parent
2e79c628e0
commit
4705d75d4a
@ -860,8 +860,10 @@ def add_network_rules(vm_name, vm_id, vm_ip, signature, seqno, vmMac, rules, vif
|
|||||||
for ip in ips:
|
for ip in ips:
|
||||||
execute("iptables -I " + vmchain + " -p icmp --icmp-type " + range + " " + direction + " " + ip + " -j "+ action)
|
execute("iptables -I " + vmchain + " -p icmp --icmp-type " + range + " " + direction + " " + ip + " -j "+ action)
|
||||||
|
|
||||||
if allow_any and protocol != 'all':
|
if allow_any
|
||||||
if protocol != 'icmp':
|
if protocol == 'all':
|
||||||
|
execute("iptables -I " + vmchain + " -m state --state NEW " + direction + " 0.0.0.0/0 -j "+action)
|
||||||
|
elif protocol != 'icmp':
|
||||||
execute("iptables -I " + vmchain + " -p " + protocol + " -m " + protocol + " --dport " + range + " -m state --state NEW -j "+ action)
|
execute("iptables -I " + vmchain + " -p " + protocol + " -m " + protocol + " --dport " + range + " -m state --state NEW -j "+ action)
|
||||||
else:
|
else:
|
||||||
range = start + "/" + end
|
range = start + "/" + end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user