From f54f33e473a6134d9722d0b8d5064cd415e89c42 Mon Sep 17 00:00:00 2001 From: Nathan Ward Date: Sun, 1 Nov 2015 16:05:56 +1300 Subject: [PATCH] Support IPv6 NAT in kernels with major version greater than, and equal to, 3.7. --- lib/puppet/type/firewallchain.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/type/firewallchain.rb b/lib/puppet/type/firewallchain.rb index cb2c614..cca48b7 100644 --- a/lib/puppet/type/firewallchain.rb +++ b/lib/puppet/type/firewallchain.rb @@ -59,7 +59,7 @@ Puppet::Type.newtype(:firewallchain) do if chain =~ /^(BROUTING|FORWARD)$/ raise ArgumentError, "PREROUTING, POSTROUTING, INPUT, and OUTPUT are the only inbuilt chains that can be used in table 'nat'" end - if protocol =~/^(IP(v6)?)?$/ + if Gem::Version.new(Facter['kernelmajversion'].value) < Gem::Version.new('3.7') and protocol =~/^(IP(v6)?)?$/ raise ArgumentError, "table nat isn't valid in IPv6. You must specify ':IPv4' as the name suffix" end when 'raw' -- 2.45.2