]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
Fix #300 for match extension protocol
authorHunter Haugen <hunter@puppetlabs.com>
Thu, 6 Feb 2014 20:42:46 +0000 (12:42 -0800)
committerHunter Haugen <hunter@puppetlabs.com>
Thu, 6 Feb 2014 20:49:11 +0000 (12:49 -0800)
commitd74c286d02736a778997aadec52d9e4c3a49a9de
treefb0eea97994bd92e84ea648d18ea5a109dc4fab3
parent8ddf4b87bedacfa3dd8b8c1c2d339c406f5e98b7
Fix #300 for match extension protocol

So... #300 fixed matching `-m (tcp|udp)` at the beginning of `-m
multiport` or `--dport` or `--sport` rules, but broke actual *creation*
of those rules because `-m (tcp|udp)` was used as an iptables argument,
which it is not.

This change removes the problematic argument from `@resource_map` and
instead just substitutes `-m (tcp|udp)` out of any existing rules before
matching. The `-m tcp` match extension arguments are optional anyway,
and not needed for iptables functionality and don't change the semantics
at all.
lib/puppet/provider/firewall/iptables.rb