aboutsummaryrefslogtreecommitdiff
path: root/manifests/interface.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/interface.pp')
-rw-r--r--manifests/interface.pp30
1 files changed, 16 insertions, 14 deletions
diff --git a/manifests/interface.pp b/manifests/interface.pp
index 1716a7e..e1bca9a 100644
--- a/manifests/interface.pp
+++ b/manifests/interface.pp
@@ -2,26 +2,28 @@ define shorewall::interface(
$zone,
$broadcast = 'detect',
$options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
+ $add_options = '',
$rfc1918 = false,
$dhcp = false,
$order = 100
){
- if $rfc1918 {
- if $dhcp {
- $options_real = "${options},dhcp"
- } else {
- $options_real = $options
- }
- } else {
- if $dhcp {
- $options_real = "${options},norfc1918,dhcp"
- } else {
- $options_real = "${options},norfc1918"
- }
+ $added_opts = $add_options ? {
+ '' => '',
+ default => ",${add_options}",
}
- shorewall::entry { "interfaces-${order}-${name}":
- line => "${zone} ${name} ${broadcast} ${options_real}",
+ $dhcp_opt = $dhcp ? {
+ false => '',
+ default => ',dhcp',
+ }
+
+ $rfc1918_opt = $rfc1918 ? {
+ false => ',norfc1918',
+ default => '',
+ }
+
+ shorewall::entry { "interfaces.d/${order}-${name}":
+ line => "${zone} ${name} ${broadcast} ${options}${dhcp_opt}${rfc1918_opt}${added_opts}",
}
}