Fix option mask to be expected netmask
This commit is contained in:
parent
a1c7eec441
commit
afb6c20581
|
@ -102,22 +102,22 @@ module VagrantPlugins
|
||||||
|
|
||||||
# If no mask is provided, attempt to locate any existing
|
# If no mask is provided, attempt to locate any existing
|
||||||
# network which contains the assigned IP address
|
# network which contains the assigned IP address
|
||||||
if !root_options[:mask] && !network_name
|
if !root_options[:netmask] && !network_name
|
||||||
network_name = env[:machine].provider.driver.
|
network_name = env[:machine].provider.driver.
|
||||||
network_containing_address(root_options[:ip])
|
network_containing_address(root_options[:ip])
|
||||||
# When no existing network is found, we are creating
|
# When no existing network is found, we are creating
|
||||||
# a new network. Since no mask was provided, default
|
# a new network. Since no mask was provided, default
|
||||||
# to /24 for ipv4 and /64 for ipv6
|
# to /24 for ipv4 and /64 for ipv6
|
||||||
if !network_name
|
if !network_name
|
||||||
root_options[:mask] = addr.ipv4? ? 24 : 64
|
root_options[:netmask] = addr.ipv4? ? 24 : 64
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# With no network name, process options to find or determine
|
# With no network name, process options to find or determine
|
||||||
# name for new network
|
# name for new network
|
||||||
if !network_name
|
if !network_name
|
||||||
subnet = IPAddr.new("#{root_options[:ip]}/#{root_options[:mask]}")
|
subnet = IPAddr.new("#{root_options[:ip]}/#{root_options[:netmask]}")
|
||||||
network = "#{subnet}/#{root_options[:mask]}"
|
network = "#{subnet}/#{root_options[:netmask]}"
|
||||||
network_options[:subnet] = network
|
network_options[:subnet] = network
|
||||||
existing_network = env[:machine].provider.driver.
|
existing_network = env[:machine].provider.driver.
|
||||||
network_defined?(network)
|
network_defined?(network)
|
||||||
|
|
Loading…
Reference in New Issue