Skip to content

Commit

Permalink
Default ipv4_address_method to DHCP
Browse files Browse the repository at this point in the history
It is really easy to forget to specify this and DHCP seems like a
reasonable default. This still crashes on unknown atoms.  I still
like that behavior to avoid situations where things like `:lnklocal`
are typoed and the system does something unexpected.
  • Loading branch information
fhunleth authored and mobileoverlord committed Aug 22, 2017
1 parent 5bb84bb commit b2adf2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/nerves_network/if_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ defmodule Nerves.Network.IFSupervisor do
:static -> Nerves.Network.StaticManager
:linklocal -> Nerves.Network.LinkLocalManager
:dhcp -> Nerves.Network.DHCPManager

# Default to DHCP if unset; crash if anything else.
nil -> Nerves.Network.DHCPManager
end
end
defp manager(:wireless, _settings) do
Expand Down

0 comments on commit b2adf2e

Please sign in to comment.