net: dhcp: Fix tftp servername handling
When the dhcp code discovered the tftp-server-name option it immediately
tries to resolve the name. This can't succeed since the we are somewhere
in the dhcp processing and the nameserver may not even be known.

Fix this by resolving the name when dhcp is completed. While at it, do
this in a way that net_set_serverip is only called when resolv() returns
something useful. Otherwise we may end up overwriting a previously
configured serverip which came from the bootp bp_siaddr field.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 37b0cce commit 66691793b091356f4dc081ffe2e942dee7c1cc04
@Sascha Hauer Sascha Hauer authored on 14 May 2013
Showing 1 changed file
View
net/dhcp.c