From: Adrian Iurca <45214757+adrianiurca@users.noreply.github.com> Date: Fri, 4 Dec 2020 11:57:59 +0000 (+0200) Subject: Update lib/puppet/provider/firewall/iptables.rb X-Git-Tag: v2.8.0~4^2^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c8eb5c8239354ab0481c00f41b3e95dfe45ed4c7;p=puppet-modules%2Fpuppetlabs-firewall.git Update lib/puppet/provider/firewall/iptables.rb Co-authored-by: sanfrancrisko <55992494+sanfrancrisko@users.noreply.github.com> --- diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index 5624e45..c101ddc 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -456,7 +456,7 @@ Puppet::Type.type(:firewall).provide :iptables, parent: Puppet::Provider::Firewa # --hex-string output is in quotes, need to move ! inside quotes values = values.gsub(%r{(!\s+)?--hex-string "(\S*?)"}, '--hex-string "\1\2"') # --condition output is in quotes, need to move ! inside quotes - values = values.gsub(%r{(!\s+)?--condition "(\S*?)"}, '--condition "\1\2"') + values.gsub!(%r{(!\s+)?--condition "(\S*?)"}, '--condition "\1\2"') # --match-set can have multiple values with weird iptables format if values =~ %r{-m set (!\s+)?--match-set} values = values.gsub(%r{(!\s+)?--match-set (\S*) (\S*)}, '--match-set \1\2 \3')