summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-03-14 13:05:14 -0400
committerMicah Anderson <micah@riseup.net>2012-03-14 13:05:14 -0400
commitefbcd9bbbe5fe95ab0500b79633d69f22fc63359 (patch)
treee1055d0ed39743c190a73259f4a3031ff74fd365
parentb57819f650bc412f458a3b37620f557b5be7495a (diff)
add ExitPolicyRejectPrivate option to exit_policy define
-rw-r--r--manifests/daemon.pp1
-rw-r--r--templates/torrc.exit_policy.erb3
2 files changed, 4 insertions, 0 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index 73014b3..173e565 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -174,6 +174,7 @@ class tor::daemon inherits tor {
# exit policies
define exit_policy( $accept = [],
$reject = [],
+ $reject_private = 1,
$ensure = present ) {
concatenated_file_part { "07.exit_policy.${name}":
diff --git a/templates/torrc.exit_policy.erb b/templates/torrc.exit_policy.erb
index 4732ad6..92367c2 100644
--- a/templates/torrc.exit_policy.erb
+++ b/templates/torrc.exit_policy.erb
@@ -1,4 +1,7 @@
# exit policies: <%= name %>
+<%- if reject_private != 1 then -%>
+ExitPolicyRejectPrivate <%= reject_private %>
+<%- end -%>
<%- for policy in accept -%>
ExitPolicy accept <%= policy %>
<%- end -%>