* `connmark`: Match the Netfilter mark value associated with the packet. Accepts values `mark/mask` or `mark`. These will be converted to hex if they are not hex already. Requires the `mark` feature.
-* `ctstate`: Matches a packet based on its state in the firewall stateful inspection table, using the conntrack module. Valid values are: 'INVALID', 'ESTABLISHED', 'NEW', 'RELATED'. Requires the `state_match` feature.
+* `ctstate`: Matches a packet based on its state in the firewall stateful inspection table, using the conntrack module. Valid values are: 'INVALID', 'ESTABLISHED', 'NEW', 'RELATED', 'UNTRACKED'. Requires the `state_match` feature.
* `date_start`: Start Date/Time for the rule to match, which must be in ISO 8601 "T" notation. The possible time range is '1970-01-01T00:00:00' to '2038-01-19T04:17:07'
* `stat_probability`: Set the probability from 0 to 1 for a packet to be randomly matched. It works only with `stat_mode => 'random'`.
-* `state`: Matches a packet based on its state in the firewall stateful inspection table. Valid values are: 'INVALID', 'ESTABLISHED', 'NEW', 'RELATED'. Requires the `state_match` feature.
+* `state`: Matches a packet based on its state in the firewall stateful inspection table. Valid values are: 'INVALID', 'ESTABLISHED', 'NEW', 'RELATED', 'UNTRACKED'. Requires the `state_match` feature.
* `string`: Set the pattern for string matching. Requires the `string_matching` feature.
* ESTABLISHED
* NEW
* RELATED
+ * UNTRACKED
EOS
- newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED)
+ newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED,:UNTRACKED)
# States should always be sorted. This normalizes the resource states to
# keep it consistent with the sorted result from iptables-save.
* ESTABLISHED
* NEW
* RELATED
+ * UNTRACKED
EOS
- newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED)
+ newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED,:UNTRACKED)
# States should always be sorted. This normalizes the resource states to
# keep it consistent with the sorted result from iptables-save.
expect(@resource[:state]).to eql [:INVALID]
end
+ it 'should accept value as a string' do
+ @resource[:state] = :UNTRACKED
+ expect(@resource[:state]).to eql [:UNTRACKED]
+ end
+
it 'should accept value as an array' do
@resource[:state] = [:INVALID, :NEW]
expect(@resource[:state]).to eql [:INVALID, :NEW]
end
it 'should sort values alphabetically' do
- @resource[:state] = [:NEW, :ESTABLISHED]
- expect(@resource[:state]).to eql [:ESTABLISHED, :NEW]
+ @resource[:state] = [:NEW, :UNTRACKED, :ESTABLISHED]
+ expect(@resource[:state]).to eql [:ESTABLISHED, :NEW, :UNTRACKED]
end
end
expect(@resource[:ctstate]).to eql [:INVALID]
end
+ it 'should accept value as a string' do
+ @resource[:state] = :UNTRACKED
+ expect(@resource[:state]).to eql [:UNTRACKED]
+ end
+
it 'should accept value as an array' do
@resource[:ctstate] = [:INVALID, :NEW]
expect(@resource[:ctstate]).to eql [:INVALID, :NEW]