Révision 925c358d
rules::out::ospf3: Allow filtering on outgoing interfaces
manifests/rules/out/ospf3.pp | ||
---|---|---|
1 |
# manage out ospf3 |
|
2 |
class nftables::rules::out::ospf3 { |
|
3 |
nftables::rule { |
|
4 |
'default_out-ospf3': |
|
5 |
content => 'ip6 saddr fe80::/64 ip6 daddr { ff02::5, ff02::6 } meta l4proto 89 accept', |
|
1 |
# |
|
2 |
# @summary manage out ospf3 |
|
3 |
# |
|
4 |
# @param oifname optional list of outgoing interfaces to filter on |
|
5 |
# |
|
6 |
class nftables::rules::out::ospf3 ( |
|
7 |
Array[String[1]] $oifname = [], |
|
8 |
) { |
|
9 |
if empty($oifname) { |
|
10 |
$_oifname = '' |
|
11 |
} else { |
|
12 |
$oifdata = $oifname.map |String[1] $interface| { "\"${interface}\"" }.join(', ') |
|
13 |
$_oifname = "oifname { ${oifdata} } " |
|
14 |
} |
|
15 |
nftables::rule { 'default_out-ospf3': |
|
16 |
content => "${_oifname}ip6 saddr fe80::/64 ip6 daddr { ff02::5, ff02::6 } meta l4proto 89 accept", |
|
6 | 17 |
} |
7 | 18 |
} |
Formats disponibles : Unified diff