Merge pull request #868 from justinlynn/add_dhcp_default_route_option

Issue #862: Allow bridged networking without removing the interface's DHCP assigned default route
This commit is contained in:
Mitchell Hashimoto 2012-05-06 14:46:58 -07:00
commit 73c8299ecd
2 changed files with 7 additions and 3 deletions

View File

@ -315,7 +315,8 @@ module Vagrant
:adapter => nil,
:mac => nil,
:bridge => nil,
:auto_config => true
:auto_config => true,
:use_dhcp_assigned_default_route => false
}.merge(options)
end
@ -388,13 +389,14 @@ module Vagrant
:type => :bridged,
:bridge => chosen_bridge,
:mac_address => config[:mac],
:nic_type => config[:nic_type],
:nic_type => config[:nic_type]
}
end
def bridged_network_config(config)
return {
:type => :dhcp
:type => :dhcp,
:use_dhcp_assigned_default_route => config[:use_dhcp_assigned_default_route]
}
end
end

View File

@ -2,5 +2,7 @@
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth<%= options[:interface] %>
iface eth<%= options[:interface] %> inet dhcp
<% unless options[:use_dhcp_assigned_default_route] %>
post-up route del default dev $IFACE
<% end %>
#VAGRANT-END