From 4b37fcbf816112bd6e81142d110d0ead358b24e4 Mon Sep 17 00:00:00 2001 From: Mohammed El-Hakim Date: Thu, 9 Jan 2020 12:01:12 +0100 Subject: [PATCH] Adding u32 --- lib/puppet/provider/firewall/iptables.rb | 1 + spec/fixtures/iptables/conversion_hash.rb | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index 8999d89..7dace71 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -166,6 +166,7 @@ Puppet::Type.type(:firewall).provide :iptables, parent: Puppet::Provider::Firewa tosource: '--to-source', to: '--to', uid: '--uid-owner', + u32: ['-m u32 --u32', '--u32'], physdev_in: '--physdev-in', physdev_out: '--physdev-out', physdev_is_bridged: '--physdev-is-bridged', diff --git a/spec/fixtures/iptables/conversion_hash.rb b/spec/fixtures/iptables/conversion_hash.rb index 937d13e..a3cfb87 100644 --- a/spec/fixtures/iptables/conversion_hash.rb +++ b/spec/fixtures/iptables/conversion_hash.rb @@ -421,6 +421,14 @@ ARGS_TO_HASH = { src_type: ['! LOCAL --limit-iface-out', 'LOCAL'], }, }, + 'u32' => { + line: '-A cali-fw-cali08818b3e1e0 -m u32 --u32 "0x0>>0x16&0x3c@0xc>>0x8=0x1000"', + table: 'filter', + params: { + chain: 'cali-fw-cali08818b3e1e0', + name: '9000 fff92a2f7e1c5e95f852fdd7e4bd103785db4ae08bc24edd8ed530403bc16e45', + }, + }, 'iniface_1_negated' => { line: '-A INPUT ! -i eth0 -j DROP -m comment --comment "060 iniface"', table: 'filter', -- 2.45.2