mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
security_group.py: check cidr unstrictly to accept cidrs like 1.1.1.1/24 (#3701)
When I add a security group rule with cidr like 1.1.1.1/24, the rule is not applied on kvm hypervisor. Ths issue does not exist in 4.13.0.0 and previous versions.
This commit is contained in:
parent
114df3dee0
commit
24db4d8a70
@ -967,7 +967,7 @@ def parse_network_rules(rules):
|
||||
ipv6 = []
|
||||
for ip in cidrs.split(","):
|
||||
try:
|
||||
network = ipaddress.ip_network(ip)
|
||||
network = ipaddress.ip_network(ip, False)
|
||||
if network.version == 4:
|
||||
ipv4.append(ip)
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user