Description: Support ip6tables protocol in firewallchain
Author: Jérôme Charaoui <jerome@riseup.net>
Forwarded: https://github.com/puppetlabs/puppetlabs-firewall/pull/1191
Index: puppet-module-puppetlabs-firewall/lib/puppet/provider/firewallchain/firewallchain.rb
===================================================================
--- puppet-module-puppetlabs-firewall.orig/lib/puppet/provider/firewallchain/firewallchain.rb
+++ puppet-module-puppetlabs-firewall/lib/puppet/provider/firewallchain/firewallchain.rb
@@ -8,8 +8,10 @@ class Puppet::Provider::Firewallchain::F
 
   # Command to list all chains and rules
   $list_command = {
-    'IPv4' => 'iptables-save',
-    'IPv6' => 'ip6tables-save'
+    'IPv4'      => 'iptables-save',
+    'IPv6'      => 'ip6tables-save',
+    'iptables'  => 'iptables-save',
+    'ip6tables' => 'ip6tables-save'
   }
   # Regex used to divide output of$list_command between tables
   $table_regex = %r{(\*(?:nat|mangle|filter|raw|rawpost|broute|security)[^*]+)}
@@ -19,8 +21,10 @@ class Puppet::Provider::Firewallchain::F
   $chain_regex = %r{\n:(INPUT|FORWARD|OUTPUT|(?:\S+))(?:\s(ACCEPT|DROP|QEUE|RETURN|PREROUTING|POSTROUTING))?}
   # Base commands for the protocols, including table affixes
   $base_command = {
-    'IPv4' => 'iptables -t',
-    'IPv6' => 'ip6tables -t'
+    'IPv4'      => 'iptables -t',
+    'iptables'  => 'iptables -t',
+    'IPv6'      => 'ip6tables -t',
+    'ip6tables' => 'ip6tables -t'
   }
   # Command to create a chain
   $chain_create_command = '-N'
