From 49a677095ce557569a4f54984ac6285256a2c38a Mon Sep 17 00:00:00 2001 From: Anastasis Andronidis Date: Thu, 26 Jul 2012 14:24:21 +0200 Subject: [PATCH] (#15702) firewall duplicated rules are not removed This fix makes sure that every rule has a different name so same rules get deleted. --- lib/puppet/provider/firewall/iptables.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index edc7a53..03da454 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -232,7 +232,7 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir # Puppet-firewall requires that all rules have comments (resource names) and will fail if # a rule in iptables does not have a comment. We get around this by appending a high level if ! hash[:name] - hash[:name] = "9999 #{Digest::MD5.hexdigest(line)}" + hash[:name] = "999#{counter} #{Digest::MD5.hexdigest(line)}" end # Iptables defaults to log_level '4', so it is omitted from the output of iptables-save. -- 2.45.2