From: Pedro González Serrano Date: Tue, 14 Apr 2020 06:38:14 +0000 (+0200) Subject: (MODULES-8543) Extend nftables' backend warning removal to ip6tables X-Git-Tag: v2.4.0~5^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1c1cb78f47ecc7c2d27bc92fc19517718f393a45;p=puppet-modules%2Fpuppetlabs-firewall.git (MODULES-8543) Extend nftables' backend warning removal to ip6tables --- diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index 7f8f9fc..8af16af 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -406,8 +406,8 @@ Puppet::Type.type(:firewall).provide :iptables, parent: Puppet::Provider::Firewa counter = 1 # String#lines would be nice, but we need to support Ruby 1.8.5 - nf_warning_msg = "# Warning: iptables-legacy tables present, use iptables-legacy-save to see them\n" - iptables_save.gsub(nf_warning_msg, '').split("\n").each do |line| + nf_warning_msg = "# Warning: ip6?tables-legacy tables present, use ip6?tables-legacy-save to see them\n" + iptables_save.gsub(%r{#{nf_warning_msg}}, '').split("\n").each do |line| unless line =~ %r{^\#\s+|^\:\S+|^COMMIT|^FATAL} if line =~ %r{^\*} table = line.sub(%r{\*}, '')