mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
Bug #1039: Port ranges in Firewall black and white tcp/udp ports don't accept spaces
This commit is contained in:
parent
5116451f19
commit
036e670a33
@ -123,6 +123,8 @@ class OpenNebulaFirewall < OpenNebulaNetwork
|
||||
|
||||
def filter_ports(chain, protocol, range, policy)
|
||||
policy = policy.to_s.upcase
|
||||
range.gsub!(/\s+/,"")
|
||||
|
||||
if range? range
|
||||
rule "-A #{chain} -p #{protocol} -m multiport --dports #{range} -j #{policy}"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user