diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc7a5ba1..c2f29acaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ IMPROVEMENTS: - `vagrant destroy` returns exit status 1 if any of the confirmations are declined. [GH-923] - Forwarded ports can specify a host IP and guest IP to bind to. [GH-1121] + - You can now set the "ip" of a private network that uses DHCP. This will + change the subnet and such that the DHCP server uses. BUG FIXES: diff --git a/plugins/providers/virtualbox/action/network.rb b/plugins/providers/virtualbox/action/network.rb index 6248c755f..9a6050db9 100644 --- a/plugins/providers/virtualbox/action/network.rb +++ b/plugins/providers/virtualbox/action/network.rb @@ -220,7 +220,7 @@ module VagrantPlugins options[:type] = options[:type].to_sym # Default IP is in the 20-bit private network block for DHCP based networks - options[:ip] = "172.28.128.1" if options[:type] == :dhcp && options[:ip].nil? + options[:ip] = "172.28.128.1" if options[:type] == :dhcp && !options[:ip] # Calculate our network address for the given IP/netmask netaddr = network_address(options[:ip], options[:netmask])