]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
Fix for #286 for pre-existing rules at the start of a chain
authorHunter Haugen <hunter@puppetlabs.com>
Thu, 6 Feb 2014 23:47:27 +0000 (15:47 -0800)
committerHunter Haugen <hunter@puppetlabs.com>
Thu, 6 Feb 2014 23:47:27 +0000 (15:47 -0800)
commit9bd5518bb095443113f7a64d46185b18c5090485
treea6fa9a1704e788f4f2d4042885b621e2bb96b0fc
parentf3a7b495fd0f7f615aafd2162a45b5133c25c512
Fix for #286 for pre-existing rules at the start of a chain

In #286 we fixed rule offset detection for existing managed and
unmanaged rules, but in the case where the first rule in a chain was
unmanaged, managed rules were still being inserted under it.

This patch changes it so that if the first rule detected for offset is
unmanaged, then we should insert before that for more consistent
behavior.
lib/puppet/provider/firewall/iptables.rb
spec/acceptance/purge_spec.rb
spec/unit/puppet/provider/iptables_spec.rb