aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-04-26 17:22:15 +0200
committerintrigeri <intrigeri@boum.org>2012-04-26 17:22:15 +0200
commit9074e56dd294b7d150ede1a06501c966393e21e6 (patch)
treea7ba8b0485eca169ee39c4207d3e76219928a98e
parentbc0c42ef3de9c0330d8fe5bc90b793327e06d8da (diff)
parent8e0dbb0d9d903fbf89e4263cd29c1b1a7d597075 (diff)
downloadpuppet-tor-9074e56dd294b7d150ede1a06501c966393e21e6.tar.gz
puppet-tor-9074e56dd294b7d150ede1a06501c966393e21e6.tar.bz2
Merge branch 'bugfix/outbound_bindaddresses-default'
-rw-r--r--manifests/daemon.pp8
-rw-r--r--templates/torrc.relay.erb2
2 files changed, 8 insertions, 2 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index 6d8c315..dddef14 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -100,7 +100,7 @@ class tor::daemon inherits tor {
# relay definition
define relay( $port = 0,
$listen_addresses = [],
- $outbound_bindaddresses = $listen_addresses,
+ $outbound_bindaddresses = [],
$bandwidth_rate = 0, # KB/s, 0 for no limit.
$bandwidth_burst = 0, # KB/s, 0 for no limit.
$accounting_max = 0, # GB, 0 for no limit.
@@ -112,6 +112,12 @@ class tor::daemon inherits tor {
$ensure = present ) {
$nickname = $name
+ if $outbound_bindaddresses == [] {
+ $real_outbound_bindaddresses = $listen_addresses
+ } else {
+ $real_outbound_bindaddresses = $outbound_bindaddresses
+ }
+
concatenated_file_part { '03.relay':
dir => $tor::daemon::snippet_dir,
content => template('tor/torrc.relay.erb'),
diff --git a/templates/torrc.relay.erb b/templates/torrc.relay.erb
index 2ab34bf..990dfcc 100644
--- a/templates/torrc.relay.erb
+++ b/templates/torrc.relay.erb
@@ -4,7 +4,7 @@ ORPort <%= port %>
<%- for listen_address in listen_addresses -%>
ORListenAddress <%= listen_address %>
<%- end -%>
-<%- for outbound_bindaddress in outbound_bindaddresses -%>
+<%- for outbound_bindaddress in real_outbound_bindaddresses -%>
OutboundBindAddress <%= outbound_bindaddress %>
<%- end -%>
<%- if nickname != '' then -%>