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

MODULES-9801 - fix negated physdev #858

Merged
merged 1 commit into from
Sep 18, 2019
Merged

Conversation

lionce
Copy link
Contributor

@lionce lionce commented Sep 18, 2019

rules with negated physdev arguments were incorrectly parsed
e.g.

-A INPUT -p tcp -m physdev ! --physdev-is-in -j ACCEPT

Warning: Puppet::Type::Firewall::ProviderIptables: Skipping unparsable iptables rule: keys (3) and values (4) count mismatch on line: -A INPUT -p tcp -m physdev ! --physdev-is-in -j ACCEPT

keys.length = 3

valrev.length=4

keys = [:physdev_is_in, :proto, :chain], valrev=["ACCEPT", ""! -j"", "tcp", "INPUT"]

also when negated physdev and negated src-type

Warning: Puppet::Type::Firewall::ProviderIptables: Skipping unparsable iptables rule: keys (4) and values (7) count mismatch on line: -A INPUT -p tcp -m physdev ! --physdev-is-in -m addrtype ! --src-type LOCAL -j ACCEPT

keys.length = 4

valrev.length=7

keys = [:jump, :physdev_is_in, :proto, :chain], valrev=["ACCEPT", ""! LOCAL"", "--src-type", "addrtype", ""! -m"", "tcp", "INPUT"]

@lionce lionce requested a review from a team as a code owner September 18, 2019 13:24
@tphoney tphoney merged commit 996b454 into puppetlabs:master Sep 18, 2019
@tphoney tphoney added the bugfix label Sep 18, 2019
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.

2 participants