net: dhcp: Do not overwrite serverip if it is valid
Some DHCP servers provide the wrong serverip in which case
it is desired to specify it manually and won't let the dhcp
command overwrite it.
This has previously been done by setting the serverip again
to the desired value after dhcp has been executed. With this
patch we do not overwrite it in the first place if it is valid
already. This is necessary when the serverip is not set via
/env/network/eth* but via nv.net.server.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 8b72bac commit 48a58879d18a21007cb7d6863c1bd569a54a5c03
@Sascha Hauer Sascha Hauer authored on 21 Nov 2017
Showing 4 changed files
View
include/net.h
View
net/dhcp.c
View
net/ifup.c
View
net/net.c