]> gitweb.fluxo.info Git - puppet-shorewall.git/commitdiff
New add_options parameter to shorewall::interface.
authorintrigeri <intrigeri@boum.org>
Thu, 16 Dec 2010 13:52:03 +0000 (14:52 +0100)
committerintrigeri <intrigeri@boum.org>
Thu, 16 Dec 2010 15:01:19 +0000 (16:01 +0100)
manifests/interface.pp

index 56b6db433904f91a19e8306a614b921f23cd2e38..0b61950801463a975be7134c6d0a4fb8b6a346ff 100644 (file)
@@ -2,15 +2,22 @@ define shorewall::interface(
     $zone,
     $broadcast = 'detect',
     $options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
+    $add_options = '',
     $rfc1918 = false,
     $dhcp = false,
     $order = 100
 ){
+    if $add_options == '' {
+      $added_options = ''
+    } else {
+      $added_options = ",${add_options}"
+    }
+
     if $rfc1918 {
         if $dhcp {
             $options_real = "${options},dhcp"
         } else {
-            $options_real = $options
+            $options_real = "$options"
         }
     } else {
         if $dhcp {
@@ -21,7 +28,7 @@ define shorewall::interface(
     }
 
     shorewall::entry { "interfaces.d/${order}-${title}":
-        line => "${zone} ${name} ${broadcast} ${options_real}",
+        line => "${zone} ${name} ${broadcast} ${options_real}${added_options}",
     }
 }