From: Nathan Ward Date: Sun, 1 Nov 2015 03:05:56 +0000 (+1300) Subject: Support IPv6 NAT in kernels with major version greater than, and equal to, 3.7. X-Git-Tag: 1.8.0~11^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f54f33e473a6134d9722d0b8d5064cd415e89c42;p=puppet-modules%2Fpuppetlabs-firewall.git Support IPv6 NAT in kernels with major version greater than, and equal to, 3.7. --- 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'