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:
commit
73c8299ecd
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue