From 7464dfbdd14ecefe71c27e30901020600bb55bce Mon Sep 17 00:00:00 2001 From: lionce Date: Thu, 14 Nov 2019 17:08:21 +0200 Subject: [PATCH] MODULES-8413 fix delete chains which is INTERNAL_CHAINS --- lib/puppet/provider/firewallchain/iptables_chain.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/firewallchain/iptables_chain.rb b/lib/puppet/provider/firewallchain/iptables_chain.rb index 5bc03c3..6182283 100644 --- a/lib/puppet/provider/firewallchain/iptables_chain.rb +++ b/lib/puppet/provider/firewallchain/iptables_chain.rb @@ -62,9 +62,10 @@ Puppet::Type.type(:firewallchain).provide :iptables_chain do if chain =~ INTERNAL_CHAINS # can't delete internal chains warning "Attempting to destroy internal chain #{@resource[:name]}" + else + debug "Deleting chain #{chain} on table #{table}" + t.call ['-t', table, '-X', chain] end - debug "Deleting chain #{chain} on table #{table}" - t.call ['-t', table, '-X', chain] end end -- 2.45.2