Rebase and cleanup conditional
This commit is contained in:
parent
2c6ef938c7
commit
48df85008c
|
@ -250,15 +250,14 @@ module VagrantPlugins
|
|||
mac: nil,
|
||||
nic_type: nil,
|
||||
type: :static,
|
||||
dhcp_ip: "172.28.128.1"
|
||||
dhcp_ip: "172.28.128.1",
|
||||
}.merge(options)
|
||||
|
||||
# Make sure the type is a symbol
|
||||
options[:type] = options[:type].to_sym
|
||||
|
||||
# Default IP is in the 20-bit private network block for DHCP based networks
|
||||
options[:ip] = options[:dhcp_ip] if options[:type] == :dhcp
|
||||
|
||||
options[:ip] ||= options[:dhcp_ip] if options[:type] == :dhcp
|
||||
|
||||
ip = IPAddr.new(options[:ip])
|
||||
if ip.ipv4?
|
||||
|
|
Loading…
Reference in New Issue