mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] dhcp: set start time
Date: Mon, 30 Apr 2012 13:32:54 +0200	[thread overview]
Message-ID: <1335785575-14953-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1335785575-14953-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-04-30 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 11:32 misc patches Sascha Hauer
2012-04-30 11:32 ` [PATCH 1/4] edit: Add proper screen size handling Sascha Hauer
2012-04-30 11:32 ` [PATCH 2/4] remove dlmalloc.src Sascha Hauer
2012-04-30 11:32 ` Sascha Hauer [this message]
2012-04-30 11:32 ` [PATCH 4/4] tlsf_malloc: return valid pointer for malloc(0) Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335785575-14953-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox