From 76c9f671f3870fed80229d7e2c4cde8bd1f4b18e Mon Sep 17 00:00:00 2001 From: Hadrien Dorio Date: Wed, 12 Dec 2012 01:31:21 +0100 Subject: [PATCH] fixes tcp and udp on the same port number GH-1108, GH-1109 fix a bug in forward_port_definitions() in Action::ForwardPorts --- plugins/providers/virtualbox/action/forward_ports.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/providers/virtualbox/action/forward_ports.rb b/plugins/providers/virtualbox/action/forward_ports.rb index 0afc71115..97524b75e 100644 --- a/plugins/providers/virtualbox/action/forward_ports.rb +++ b/plugins/providers/virtualbox/action/forward_ports.rb @@ -32,7 +32,8 @@ module VagrantPlugins # approach. guest_port_mapping = {} @env[:machine].config.vm.forwarded_ports.each do |options| - guest_port_mapping[options[:guestport]] = options + key = options[:protocol].to_s + options[:guestport].to_s + guest_port_mapping[key] = options end # Return the values, since the order doesn't really matter