1
0
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:
Jaime Melis 2011-12-21 20:08:43 +01:00
parent 5116451f19
commit 036e670a33

View File

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