summaryrefslogtreecommitdiff
path: root/templates/remote_host.erb
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-01-03 18:31:05 +0100
committermh <mh@immerda.ch>2013-01-03 18:31:05 +0100
commit5ce46c56e0ed95e03c3322f6eba53488a0615207 (patch)
treeee2226bad8fb7110d0259b021710cafcaf5cb8fe /templates/remote_host.erb
parent19faa5112c736788ac0ad73eaad8009267be0ad0 (diff)
automatically configure a subnet for all listening ips
Diffstat (limited to 'templates/remote_host.erb')
-rw-r--r--templates/remote_host.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/remote_host.erb b/templates/remote_host.erb
index 5a22ca9..a05378c 100644
--- a/templates/remote_host.erb
+++ b/templates/remote_host.erb
@@ -4,7 +4,7 @@ conn <%= name %>
rightid=@<%= right_id %>
rightcert=<%= right_cert_name %>.asc
<% unless right_subnet.empty? -%>
- rightsubnet=<%= right_subnet.join(',') %>
+ rightsubnet=<%= right_subnet.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %>
<% end -%>
type=transport
auto=start