From a9b023b4771399c1c7557e6f94ae4839d32f4894 Mon Sep 17 00:00:00 2001 From: Ken Barber Date: Fri, 16 Mar 2012 15:16:23 -0700 Subject: [PATCH] (#13192) Fix allvalidchain iteration Before this patch, we were getting errors because chain & table were swapped during creation. --- lib/puppet/provider/firewallchain/iptables_chain.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/firewallchain/iptables_chain.rb b/lib/puppet/provider/firewallchain/iptables_chain.rb index 758d37c..0efb55d 100644 --- a/lib/puppet/provider/firewallchain/iptables_chain.rb +++ b/lib/puppet/provider/firewallchain/iptables_chain.rb @@ -61,7 +61,7 @@ Puppet::Type.type(:firewallchain).provide :iptables_chain do if @resource[:name] =~ InternalChains self.warn "Attempting to destroy internal chain #{@resource[:name]}" end - allvalidchains do |t, table, chain| + allvalidchains do |t, chain, table| debug "Deleting chain #{chain} on table #{table}" t.call ['-t',table,'-X',chain] end @@ -73,7 +73,7 @@ Puppet::Type.type(:firewallchain).provide :iptables_chain do def policy=(value) return if value == :empty - allvalidchains do |t, table, chain| + allvalidchains do |t, chain, table| p = ['-t',table,'-P',chain,value.to_s.upcase] debug "[set policy] #{t} #{p}" t.call p -- 2.45.2