summaryrefslogtreecommitdiff
path: root/Generate
diff options
context:
space:
mode:
Diffstat (limited to 'Generate')
-rwxr-xr-xGenerate16
1 files changed, 9 insertions, 7 deletions
diff --git a/Generate b/Generate
index 632a0db..4bab1eb 100755
--- a/Generate
+++ b/Generate
@@ -656,15 +656,17 @@ hostlist.each{ |host|
remote_addr += peer['host_address_extra'] if peer['host_address_extra']
remote_port = [ host['inet_port'][ peer['name'] ]['remote'] ]
remote_port += peer['host_port_extra'] if peer['host_port_extra']
- if remote_addr.size > 0 then
- remote_addr.each do |raddr|
- remote_port.each do |rport|
- conffile.puts "remote #{raddr} #{rport}"
+ if not host_is_server
+ if remote_addr.size > 0 then
+ remote_addr.each do |raddr|
+ remote_port.each do |rport|
+ conffile.puts "remote #{raddr} #{rport}"
+ end
end
+ else
+ throw "have host_port_extra but no host_address(_extra)" if peer['host_port_extra']
+ conffile.puts "rport #{host['inet_port'][ peer['name'] ]['remote']}"
end
- else
- throw "have host_port_extra but no host_address(_extra)" if peer['host_port_extra']
- conffile.puts "rport #{host['inet_port'][ peer['name'] ]['remote']}"
end
conffile.puts "lport #{host['inet_port'][ peer['name'] ]['local']}" unless host['accepts'].nil?
if host['accepts'].nil?