]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Update lib/puppet/provider/firewall/iptables.rb
authorAdrian Iurca <45214757+adrianiurca@users.noreply.github.com>
Fri, 4 Dec 2020 11:57:59 +0000 (13:57 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Dec 2020 11:57:59 +0000 (13:57 +0200)
Co-authored-by: sanfrancrisko <55992494+sanfrancrisko@users.noreply.github.com>
lib/puppet/provider/firewall/iptables.rb

index 5624e45b6a61e7e2beebc5ff1b5b4c98075e66e4..c101ddcd2433e94f2dc18b8791358acce4f7a17d 100644 (file)
@@ -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')