puppetlabs/puppetlabs-firewall — pull request #248 by senax (2013-09-15 21:03:29+00:00)
Title: Generate parser list

Updated pull-request, now with spec test.

This patch should fix parsing iptables-save output from iptables lines as generated by system-config-firewall-tui.

Example line: -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

Before patch: firewall { '9004 dc0f1adfee77aa04ef7fdf348860a701':
ensure => 'present',
action => 'accept',
chain => 'INPUT',
dport => ['NEW'],
proto => 'tcp',
state => ['22'],
table => 'filter',
}

After patch: firewall { '9004 dc0f1adfee77aa04ef7fdf348860a701':
ensure => 'present',
action => 'accept',
chain => 'INPUT',
dport => ['22'],
proto => 'tcp',
state => ['NEW'],
table => 'filter',
}