1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

extended regex to match the chains in deactivate_nic

This commit is contained in:
Marcel Weinberg 2016-10-31 10:01:26 +01:00
parent 4d3f6b2e47
commit c8cf25aa88

@ -328,7 +328,7 @@ module SGIPTables
remove_chains = []
iptables_s.lines.each do |line|
if line.match(/^-N #{chain}$/)
if line.match(/^-N #{chain}(-|$)/)
remove_chains << line.split[1]
end
end
@ -336,7 +336,7 @@ module SGIPTables
remove_chains.each {|c| commands.add :iptables, "-X #{c}" }
ipset_list.lines.each do |line|
if line.match(/^#{chain}$/)
if line.match(/^#{chain}(-|$)/)
set = line.strip
commands.add :ipset, "destroy #{set}"
end