]> gitweb.fluxo.info Git - puppet-shorewall.git/commitdiff
shorewall::mangle: allow specifying the ACTION explicitly.
authorintrigeri <intrigeri@boum.org>
Thu, 16 Jul 2015 12:34:54 +0000 (12:34 +0000)
committerintrigeri <intrigeri@boum.org>
Thu, 16 Jul 2015 12:34:54 +0000 (12:34 +0000)
Previously, it was using $name, which prevented adding multiple mangle
rules that share a common ACTION, with different parameters.

manifests/mangle.pp

index e3fd1b3b40df91107e67e69c0c09d9c4bd4ae969..cd404e7c6098d5ecda63813df26e6b41d7cc3919 100644 (file)
@@ -1,6 +1,7 @@
 define shorewall::mangle(
   $source,
   $destination,
+  $action          = $name,
   $proto           = '-',
   $destinationport = '-',
   $sourceport      = '-',
@@ -14,6 +15,6 @@ define shorewall::mangle(
   $order           = '100'
 ){
   shorewall::entry{"mangle-${order}-${name}":
-    line => "${name} ${source} ${destination} ${proto} ${destinationport} ${sourceport} ${user} ${test} ${length} ${tos} ${connbytes} ${helper} ${headers}"
+    line => "${action} ${source} ${destination} ${proto} ${destinationport} ${sourceport} ${user} ${test} ${length} ${tos} ${connbytes} ${helper} ${headers}"
   }
 }