[PATCH 3/3] dhcp: fix request packet's seconds elapsed

Eric Bénard eric at eukrea.com
Wed Jan 28 15:37:34 PST 2015


it's done in the discover packet so let's do it also in the request packet.

Signed-off-by: Eric Bénard <eric at eukrea.com>
---
 net/dhcp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/dhcp.c b/net/dhcp.c
index 7f9b989..2b469a9 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -557,8 +557,7 @@ static void dhcp_send_request_packet(struct bootp *bp_offer)
 	bp->bp_htype = HWT_ETHER;
 	bp->bp_hlen = HWL_ETHER;
 	bp->bp_hops = 0;
-	/* FIXME what is this? */
-//	bp->bp_secs = htons(get_timer(0) / CFG_HZ);
+	bp->bp_secs = htons(get_time_ns() >> 30);
 
 	/*
 	 * RFC3046 requires Relay Agents to discard packets with
-- 
1.9.3




More information about the barebox mailing list