Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #286 for pre-existing rules at the start of a chain #303

Merged
merged 1 commit into from
Feb 8, 2014

Conversation

hunner
Copy link
Contributor

@hunner hunner commented Feb 6, 2014

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.

In puppetlabs#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.
apply_manifest(pp, :catch_failures => true)

expect(shell('/sbin/iptables-save').stdout).to match(/-A INPUT -s 1\.2\.1\.1\/32 -p tcp \n-A INPUT -s 1\.2\.1\.1\/32 -p udp/)
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a testing attempt for #301 and is how I found the issue fixed in this PR.

apenney pushed a commit that referenced this pull request Feb 8, 2014
Fix for #286 for pre-existing rules at the start of a chain
@apenney apenney merged commit 1bdf361 into puppetlabs:master Feb 8, 2014
@hunner hunner deleted the fix_unmanaged branch February 8, 2014 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants