Commit a33e9330 authored by intrigeri's avatar intrigeri
Browse files

New add_options parameter to shorewall::interface.

parent 34c964b1
...@@ -2,15 +2,22 @@ define shorewall::interface( ...@@ -2,15 +2,22 @@ define shorewall::interface(
$zone, $zone,
$broadcast = 'detect', $broadcast = 'detect',
$options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians', $options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
$add_options = '',
$rfc1918 = false, $rfc1918 = false,
$dhcp = false, $dhcp = false,
$order = 100 $order = 100
){ ){
if $add_options == '' {
$added_options = ''
} else {
$added_options = ",${add_options}"
}
if $rfc1918 { if $rfc1918 {
if $dhcp { if $dhcp {
$options_real = "${options},dhcp" $options_real = "${options},dhcp"
} else { } else {
$options_real = $options $options_real = "$options"
} }
} else { } else {
if $dhcp { if $dhcp {
...@@ -21,7 +28,7 @@ define shorewall::interface( ...@@ -21,7 +28,7 @@ define shorewall::interface(
} }
shorewall::entry { "interfaces.d/${order}-${title}": shorewall::entry { "interfaces.d/${order}-${title}":
line => "${zone} ${name} ${broadcast} ${options_real}", line => "${zone} ${name} ${broadcast} ${options_real}${added_options}",
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment