Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
redir: start in foreground mode under v3.x
Browse files Browse the repository at this point in the history
ref #467
  • Loading branch information
Virgil Dupras committed Jul 4, 2018
1 parent 8a1e186 commit c1dd7ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/vagrant-lxc/action/forward_ports.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ def compile_forwarded_ports(config)

def redirect_port(host_ip, host_port, guest_ip, guest_port)
if redir_version >= 3
params = %W( :#{host_port} #{guest_ip}:#{guest_port} )
params[0] = "#{host_ip}:#{host_port}" if host_ip
params = %W( -n #{host_ip}:#{host_port} #{guest_ip}:#{guest_port} )
else
params = %W( --lport=#{host_port} --caddr=#{guest_ip} --cport=#{guest_port} )
params.unshift "--laddr=#{host_ip}" if host_ip
Expand Down

0 comments on commit c1dd7ba

Please sign in to comment.