From: Chris Rutter Date: Tue, 11 Jun 2013 15:34:50 +0000 (-0400) Subject: fix for default burst value of 5 X-Git-Tag: list~8^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f92c7f7a4470c8adf2f52004135308394cdd6804;p=puppet-modules%2Fpuppetlabs-firewall.git fix for default burst value of 5 fixes #200 --- diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index 43ae556..39f50a7 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -247,6 +247,12 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir hash[:log_level] = '4' end + # Iptables defaults to burst '5', so it is ommitted from the output of iptables-save. + # If the :limit value is set and you don't have a burst set, we assume it to be '5'. + if hash[:limit] && ! hash[:burst] + hash[:burst] = '5' + end + hash[:line] = line hash[:provider] = self.name.to_s hash[:table] = table