From: david22swan Date: Wed, 28 Sep 2022 10:20:40 +0000 (+0100) Subject: (maint) Fix for negated physdev_is_* X-Git-Tag: v3.6.0~3^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b1b0408336c4e7a56b896a0775707fc69b23857b;p=puppet-modules%2Fpuppetlabs-firewall.git (maint) Fix for negated physdev_is_* Why confirming that this fix worked as intended it was shown that in fixing the original issue a second one had been uncovered. This should fix the second one without infringing on the first fix. --- diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index 65265f1..1458e75 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -551,7 +551,7 @@ Puppet::Type.type(:firewall).provide :iptables, parent: Puppet::Provider::Firewa values.sub(%r{'#{resource_map[bool]} "! "'}, "#{resource_map[bool]} true") else # append `true` to booleans that are not already negated (followed by "!") - values.sub(%r{#{resource_map[bool]}(?=\s|$)(?!"!")}, "#{resource_map[bool]} true") + values.sub(%r{#{resource_map[bool]}(?=\s|$)(?!\s?"!")}, "#{resource_map[bool]} true") end end