Révision 8cdd24a5
rules::icmp: Allow ICMP packets with extensions
spec/classes/rules/icmp_spec.rb | ||
---|---|---|
8 | 8 |
let(:facts) { os_facts } |
9 | 9 |
|
10 | 10 |
context 'default options' do |
11 |
it { is_expected.to compile } |
|
12 |
|
|
13 |
it { |
|
14 |
expect(subject).to contain_nftables__rule('default_in-accept_icmpv4').with( |
|
15 |
content: 'ip protocol icmp accept', |
|
16 |
order: '10' |
|
17 |
) |
|
18 |
} |
|
11 |
it { is_expected.to compile.with_all_deps } |
|
19 | 12 |
|
20 |
it { |
|
21 |
expect(subject).to contain_nftables__rule('default_in-accept_icmpv6').with( |
|
22 |
content: 'ip6 nexthdr ipv6-icmp accept', |
|
23 |
order: '10' |
|
24 |
) |
|
25 |
} |
|
13 |
it { is_expected.to contain_nftables__rule('default_in-accept_icmp').with_content('meta l4proto { icmp, icmpv6} accept').with_order('10') } |
|
14 |
it { is_expected.not_to contain_nftables__rule('default_in-accept_icmpv4') } |
|
15 |
it { is_expected.not_to contain_nftables__rule('default_in-accept_icmpv6') } |
|
26 | 16 |
end |
27 | 17 |
|
28 | 18 |
context 'with custom ICMP types (v4 only)' do |
... | ... | |
50 | 40 |
|
51 | 41 |
it { |
52 | 42 |
expect(subject).to contain_nftables__rule('default_in-accept_icmpv6').with( |
53 |
content: 'ip6 nexthdr ipv6-icmp accept',
|
|
43 |
content: 'meta l4proto icmpv6 accept',
|
|
54 | 44 |
order: '10' |
55 | 45 |
) |
56 | 46 |
} |
Formats disponibles : Unified diff