From c8eb5c8239354ab0481c00f41b3e95dfe45ed4c7 Mon Sep 17 00:00:00 2001 From: Adrian Iurca <45214757+adrianiurca@users.noreply.github.com> Date: Fri, 4 Dec 2020 13:57:59 +0200 Subject: [PATCH] Update lib/puppet/provider/firewall/iptables.rb Co-authored-by: sanfrancrisko <55992494+sanfrancrisko@users.noreply.github.com> --- lib/puppet/provider/firewall/iptables.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.45.2