From c1dd7baf2a1ced12c88ad9d7ab56a15d0cae1ae1 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 4 Jul 2018 14:34:26 -0400 Subject: [PATCH] redir: start in foreground mode under v3.x ref #467 --- lib/vagrant-lxc/action/forward_ports.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/action/forward_ports.rb b/lib/vagrant-lxc/action/forward_ports.rb index d3eb2a7..e45f766 100644 --- a/lib/vagrant-lxc/action/forward_ports.rb +++ b/lib/vagrant-lxc/action/forward_ports.rb @@ -81,8 +81,7 @@ module Vagrant 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