From 12a68321511f7b298520887d5876357406aee151 Mon Sep 17 00:00:00 2001 From: eyJhb Date: Mon, 25 Dec 2017 20:49:35 +0100 Subject: [PATCH] Fixed hostonly matching not respecting :name argument --- plugins/providers/virtualbox/action/network.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/providers/virtualbox/action/network.rb b/plugins/providers/virtualbox/action/network.rb index 58c63b726..90634cf3f 100644 --- a/plugins/providers/virtualbox/action/network.rb +++ b/plugins/providers/virtualbox/action/network.rb @@ -479,6 +479,11 @@ module VagrantPlugins @env[:machine].provider.driver.read_host_only_interfaces.each do |interface| return interface if config[:name] && config[:name] == interface[:name] + #if a config name is specified, we should only look for that. + if config[:name] != "" + next + end + if interface[:ip] != "" return interface if this_netaddr == \ network_address(interface[:ip], interface[:netmask])