From 1c1cb78f47ecc7c2d27bc92fc19517718f393a45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pedro=20Gonz=C3=A1lez=20Serrano?= Date: Tue, 14 Apr 2020 08:38:14 +0200 Subject: [PATCH] (MODULES-8543) Extend nftables' backend warning removal to ip6tables --- lib/puppet/provider/firewall/iptables.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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{\*}, '') -- 2.45.2