Merge pull request #9302 from eyJhb/master

Fixed hostonly matching not respecting :name argument
This commit is contained in:
Brian Cain 2018-02-26 14:50:45 -08:00 committed by GitHub
commit 007e6f49aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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])