summaryrefslogtreecommitdiff
path: root/templates/ipsec.conf.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/ipsec.conf.erb')
-rw-r--r--templates/ipsec.conf.erb3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/ipsec.conf.erb b/templates/ipsec.conf.erb
index ddaf842..44225d3 100644
--- a/templates/ipsec.conf.erb
+++ b/templates/ipsec.conf.erb
@@ -15,6 +15,9 @@ conn %default
left=<%= scope.lookupvar('strongswan::default_left_ip_address') %>
leftcert=<%= scope.lookupvar('::fqdn') %>.asc
leftid=@<%= scope.lookupvar('::fqdn') %>
+<% unless (subn=scope.lookupvar('strongswan::default_left_subnet')).empty? -%>
+ leftsubnet=<%= subn.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %>
+<% end -%>
<% unless scope.lookupvar('strongswan::additional_options').empty? -%>
<%= scope.lookupvar('strongswan::additional_options') %>