9
0
Fork 0

dhcp: set start time

The dhcp command starts with an unitialized start time. The start
time is often long in the past which results in an immediate timeout
and resend of the dhcp packet. Fix this by initializing the start time
correctly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-04-29 13:56:27 +02:00
parent 47f8cf2d08
commit cac75c0f23
1 changed files with 1 additions and 0 deletions

View File

@ -651,6 +651,7 @@ static int do_dhcp(int argc, char *argv[])
net_set_ip(0);
dhcp_start = get_time_ns();
ret = bootp_request(); /* Basically same as BOOTP */
if (ret)
goto out1;