[PATCH 3/4] dhcp: set start time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 net/dhcp.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/dhcp.c b/net/dhcp.c
index 0c882fb..bd3ac1a 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -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;
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux