Permalink
Browse files

(#10322) Insert order hash included chains from different tables

This fix corrects the insert_order handling to make sure that not only are
rules from the same chain evaulated, but we also check that the table
matches as well.
  • Loading branch information...
1 parent e9fd6d1 commit 47318a009c50f2625bd3df8a1de78d5477d35b57 @kbarber kbarber committed Jul 24, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/puppet/provider/firewall/iptables.rb
View
6 lib/puppet/provider/firewall/iptables.rb
@@ -288,9 +288,11 @@ def insert_order
debug("[insert_order]")
rules = []
- # Find list of current rules based on chain
+ # Find list of current rules based on chain and table
self.class.instances.each do |rule|
- rules << rule.name if rule.chain == resource[:chain].to_s
+ if rule.chain == resource[:chain].to_s and rule.table == resource[:table].to_s
+ rules << rule.name
+ end
end
# No rules at all? Just bail now.

0 comments on commit 47318a0

Please sign in to comment.