]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
fix for default burst value of 5
authorChris Rutter <crutter@maileig.com>
Tue, 11 Jun 2013 15:34:50 +0000 (11:34 -0400)
committerChris Rutter <crutter@maileig.com>
Tue, 11 Jun 2013 15:40:08 +0000 (11:40 -0400)
fixes #200

lib/puppet/provider/firewall/iptables.rb

index 43ae55689cc0c66c0ee49030088bcb1bd14b780f..39f50a7142fbae7a114bac3932fb39599e27773d 100644 (file)
@@ -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