Révision 5944b9cb
Allow some other types of verdicts
manifests/simplerule.pp | ||
---|---|---|
56 | 56 |
Pattern[/^\d\d$/] $order = '50', |
57 | 57 |
String $chain = 'default_in', |
58 | 58 |
String $table = 'inet-filter', |
59 |
Enum['accept', 'drop'] $action = 'accept',
|
|
59 |
Enum['accept', 'continue', 'drop', 'queue', 'return'] $action = 'accept',
|
|
60 | 60 |
Optional[String] $comment = undef, |
61 | 61 |
Optional[Variant[Array[Stdlib::Port, 1], Stdlib::Port, Pattern[/\d+-\d+/]]] $dport = undef, |
62 | 62 |
Optional[Enum['tcp', 'tcp4', 'tcp6', 'udp', 'udp4', 'udp6']] $proto = undef, |
spec/defines/simplerule_spec.rb | ||
---|---|---|
222 | 222 |
) |
223 | 223 |
} |
224 | 224 |
end |
225 |
|
|
226 |
describe 'counter and continue sport' do |
|
227 |
let(:params) do |
|
228 |
{ |
|
229 |
proto: 'tcp', |
|
230 |
sport: 80, |
|
231 |
counter: true, |
|
232 |
action: 'continue', |
|
233 |
} |
|
234 |
end |
|
235 |
|
|
236 |
it { is_expected.to compile } |
|
237 |
it { |
|
238 |
is_expected.to contain_nftables__rule('default_in-my_default_rule_name').with( |
|
239 |
content: 'tcp sport {80} counter continue', |
|
240 |
) |
|
241 |
} |
|
242 |
end |
|
225 | 243 |
end |
226 | 244 |
end |
227 | 245 |
end |
Formats disponibles : Unified diff